mirror of
https://github.com/zyachel/quetre.git
synced 2025-04-05 14:07:37 +03:00
feat(route): add new route
add /topic/:slug route both in api as well as in view
This commit is contained in:
parent
6ad2269951
commit
0a35cdaa15
10 changed files with 490 additions and 4 deletions
|
@ -1,12 +1,17 @@
|
|||
import express from 'express';
|
||||
import { about, unimplemented, answers } from '../controllers/apiController.js';
|
||||
import {
|
||||
about,
|
||||
unimplemented,
|
||||
answers,
|
||||
topic,
|
||||
} from '../controllers/apiController.js';
|
||||
|
||||
const apiRouter = express.Router();
|
||||
|
||||
apiRouter.get('/', about);
|
||||
apiRouter.get('/search', unimplemented);
|
||||
apiRouter.get('/profile/:name', unimplemented);
|
||||
apiRouter.get('/topic/:name', unimplemented);
|
||||
apiRouter.get('/topic/:slug', topic);
|
||||
apiRouter.get('/unanswered/:slug', answers);
|
||||
apiRouter.get('/:slug', answers);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue