mirror of
https://bitbucket.org/tagfer_team/tagfer-server.git
synced 2025-12-25 03:37:38 +00:00
T-954157790456099: add isProfileNumberValidation check to getUserProfile endpoint
This commit is contained in:
parent
2449b207da
commit
b49d62c151
@ -35,8 +35,8 @@ async function updateUserProfile(req, res) {
|
||||
|
||||
async function getUserProfile(req, res) {
|
||||
const profileNumber = req.params.profileNumber;
|
||||
if (profileNumber > 4 || profileNumber < 1) {
|
||||
res.status(http.BAD_REQUEST).json({error: errors.NO_PROFILE_FOUND_FOR_NUMBER});
|
||||
if (!utils.isProfileNumberValid(profileNumber)) {
|
||||
return;
|
||||
} else {
|
||||
const sessionId = utils.getSessionIdFromAuthHeader(req, res);
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user