Genre Admin page, new Genre store

This commit is contained in:
2024-10-26 16:23:00 +02:00
parent cdb3f02156
commit c570a04052
11 changed files with 218 additions and 32 deletions

View File

@@ -1,4 +1,3 @@
import { Rating } from "../models/acts/rating.model";
import { Band } from "../models/acts/band.model";
import { Genre } from "../models/acts/genre.model";
import { Request, Response, Router } from "express";
@@ -9,7 +8,9 @@ export const genre = Router()
* Get all available Genres
*/
genre.get("/", (req: Request, res: Response) => {
Genre.findAll()
Genre.findAll({
include: [ Band ]
})
.then(genres => {
res.status(200).json(genres)
})