diff --git a/modules/hudozka-api/src/controllers/tag.ts b/modules/hudozka-api/src/controllers/tag.ts index 4e5ca030..0185cbf8 100644 --- a/modules/hudozka-api/src/controllers/tag.ts +++ b/modules/hudozka-api/src/controllers/tag.ts @@ -20,29 +20,3 @@ export async function getAll(req: Request, res: Response) { }) } } - -export async function findItems(req: Request, res: Response) { - const slug = req.params.slug - - const data = await Page.find({ - tags: { - - } - - }) - const tags = data - .flatMap(x => x.tags) - .filter(x => x.isValid()) - const items = unique(tags, t => t.slug) - - if (data) { - res.json({ - items, - }) - } else { - res.status(404) - res.json({ - error: `Not found` - }) - } -} diff --git a/modules/hudozka-api/src/server.ts b/modules/hudozka-api/src/server.ts index 458a4bbe..21104af6 100644 --- a/modules/hudozka-api/src/server.ts +++ b/modules/hudozka-api/src/server.ts @@ -33,7 +33,6 @@ async function main() { app.get('/image', image.getItem) app.get('/tags', tag.getAll) - app.get('/tags/:slug', tag.findItems) app.listen(port, () => { console.log(`> Ready on http://localhost:${port}`)