fixed server error when trying to view nonexistend application
This commit is contained in:
@@ -80,8 +80,10 @@ router.get('/me', [requireLogin], async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
let application = await getMemberApplication(userID);
|
let application = await getMemberApplication(userID);
|
||||||
|
|
||||||
if (application === undefined)
|
if (application === undefined) {
|
||||||
res.sendStatus(204);
|
res.sendStatus(204);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const comments: CommentRow[] = await getApplicationComments(application.id);
|
const comments: CommentRow[] = await getApplicationComments(application.id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user