mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 12:30:06 +02:00
Add genres route
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import express, { Router } from 'express';
|
||||
import { controller } from '@controllers/index';
|
||||
import { validation } from '@validations/index';
|
||||
import { validateRequest } from '@validations/shared.validation';
|
||||
|
||||
export const router: Router = express.Router({ mergeParams: true });
|
||||
|
||||
router.get(
|
||||
'/',
|
||||
validateRequest(validation.genres.list),
|
||||
controller.genres.getList
|
||||
);
|
||||
@@ -5,6 +5,7 @@ import { router as albumArtistsRouter } from './album-artists.route';
|
||||
import { router as albumsRouter } from './albums.route';
|
||||
import { router as artistsRouter } from './artists.route';
|
||||
import { router as authRouter } from './auth.route';
|
||||
import { router as genresRouter } from './genres.route';
|
||||
import { router as serversRouter } from './servers.route';
|
||||
import { router as songsRouter } from './songs.route';
|
||||
import { router as tasksRouter } from './tasks.route';
|
||||
@@ -44,4 +45,5 @@ routes.param('serverId', (req, _res, next, serverId) => {
|
||||
routes.use('/api/servers/:serverId/album-artists', albumArtistsRouter);
|
||||
routes.use('/api/servers/:serverId/artists', artistsRouter);
|
||||
routes.use('/api/servers/:serverId/albums', albumsRouter);
|
||||
routes.use('/api/servers/:serverId/genres', genresRouter);
|
||||
routes.use('/api/servers/:serverId/songs', songsRouter);
|
||||
|
||||
Reference in New Issue
Block a user