server: fix post 500 errors
This commit is contained in:
parent
6de415ed99
commit
0504bd57e2
1 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ posts.post(
|
|||
|
||||
res.json(newPost)
|
||||
} catch (e) {
|
||||
next(e)
|
||||
res.status(400).json(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -274,7 +274,7 @@ posts.get(
|
|||
res.json(post)
|
||||
}
|
||||
} catch (e) {
|
||||
next(e)
|
||||
res.status(400).json(e)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue