Skip to content

Commit

Permalink
Fix study detail logic to allow access without login
Browse files Browse the repository at this point in the history
  • Loading branch information
yesjjin99 committed Jun 5, 2022
1 parent 5500cec commit f6a2520
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/routes/study/study.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ const getStudybyId = async (req: Request, res: Response) => {
applied: appliedFlag ? true : false,
});
} catch (e) {
res.status(200).json({ ...study, bookmarked: false, applied: false });
return res
.status(200)
.json({ ...study, bookmarked: false, applied: false });
}
} else {
return res
.status(200)
.json({ ...study, bookmarked: false, applied: false });
}

return res
.status(200)
.json({ ...study, bookmarked: false, applied: false });
} catch (e) {
if ((e as Error).message === NOT_FOUND) {
return res.status(404).json({ message: NOT_FOUND });
Expand Down

0 comments on commit f6a2520

Please sign in to comment.