From 42b59ad2d6e10b6110948aee0a88418eb5dcd94c Mon Sep 17 00:00:00 2001 From: Rory& Date: Sun, 1 Jun 2025 15:42:18 +0200 Subject: Rewrite routing --- src/api/routes/indexRoute.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/api/routes/indexRoute.js') diff --git a/src/api/routes/indexRoute.js b/src/api/routes/indexRoute.js index 3b9eaef..b6fe28e 100644 --- a/src/api/routes/indexRoute.js +++ b/src/api/routes/indexRoute.js @@ -1,6 +1,15 @@ +import { RouteDescription, RouteMethod } from '#api/RouteDescription.js'; + +/** + * @type {RouteDescription} + */ export const indexRoute = { - route: '/', - onGet(req, res) { - res.send('What art thou doing here???'); + path: '/', + methods: { + get: new RouteMethod({ + method(req, res) { + res.send('What art thou doing here???'); + } + }) } }; -- cgit 1.5.1