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