feat: add search functionality

this commit adds long awaited search feature

fix https://github.com/zyachel/quetre/issues/21
This commit is contained in:
zyachel 2022-10-31 01:05:02 +05:30
parent 86df58367a
commit 1cdafe0380
16 changed files with 546 additions and 27 deletions

View file

@ -6,12 +6,13 @@ import {
topic,
image,
profile,
search,
} from '../controllers/apiController.js';
const apiRouter = express.Router();
apiRouter.get('/', about);
apiRouter.get('/search', unimplemented);
apiRouter.get('/(|search)', search);
apiRouter.get('/about', about);
apiRouter.get('/image/:domain/:path', image);
apiRouter.get('/profile/:name', profile);
apiRouter.get('/topic/:slug', topic);