handle genres
This commit is contained in:
parent
c8cb206971
commit
f5f7f21ae6
|
@ -16,7 +16,7 @@ const __dirname = path.dirname(__filename);
|
|||
// })
|
||||
export default pino(
|
||||
{
|
||||
level: 'fatal',
|
||||
level: 'error',
|
||||
formatters: {
|
||||
level: (label) => {
|
||||
return { level: label.toUpperCase() };
|
||||
|
|
|
@ -34,6 +34,11 @@ export const getEndpoints = (dbObject) => {
|
|||
res.send(dbObject.responses)
|
||||
return
|
||||
})
|
||||
router.get('/genres', (req,res)=>{
|
||||
res.statusCode=200
|
||||
res.send(dbObject.genres)
|
||||
return
|
||||
})
|
||||
|
||||
return router
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export default class Title extends Entity{
|
|||
}
|
||||
set _genres(prop){
|
||||
if(prop){
|
||||
if(!dataValidation.isObject(prop)){throw new TypeError("genres must be an object")}
|
||||
//if(!dataValidation.isObject(prop)){throw new TypeError("genres must be an object")}
|
||||
this.genres=prop
|
||||
}
|
||||
}
|
||||
|
|
BIN
submissions
BIN
submissions
Binary file not shown.
Loading…
Reference in New Issue