remove unecessary logging
This commit is contained in:
parent
97e8179164
commit
0d66151fae
|
@ -49,10 +49,12 @@ export const endpoints = (db) => {
|
|||
const endpoint = (router,Entity,path,method,db) =>{
|
||||
router.post(`/${Entity.name.toLowerCase()}/${path}`, async (req,res) => {
|
||||
try {
|
||||
logger.trace({data:req.body},"POST request received")
|
||||
const entity = new Entity(req.body)
|
||||
await entity[method](db)
|
||||
res.sendStatus(200)
|
||||
} catch (error) {
|
||||
logger.error(error)
|
||||
if(error instanceof TypeError){
|
||||
res.sendStatus(400)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue