Skip to content

Commit

Permalink
modified routes return value
Browse files Browse the repository at this point in the history
  • Loading branch information
konpoku committed Oct 27, 2024
1 parent 6adf96e commit e850bd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/routes/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ router.post("/chat/update/status",authenticate(["counselor","teacher"]), async (
return res.status(455).send("Error: Application does not exist");
}
if(chat_status === true){
return res.status(200).send("true");
return res.status(200).json({chat_status: true});
}
else{
return res.status(200).send("false");
return res.status(200).json({chat_status: false});
}
} catch (err) {
console.log(err)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/mentor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ router.post("/update/available", authenticate(["counselor", "teacher"]), async (
return res.status(422).send("422 Unprocessable Entity: Missing credentials");
}
const mentor_available = await MentHasFunc.update_mentor_info_available(uuid, available);
return res.status(200).send(mentor_available);
return res.status(200).json({mentor_available: mentor_available});
} catch (err) {
return res.status(500).send("Internal Server Error");
}
Expand Down

0 comments on commit e850bd3

Please sign in to comment.