Fixed a bug in the media route
This commit is contained in:
parent
99b6102847
commit
e414db9caa
@ -23,7 +23,7 @@ app.get("/:id", hasRank(Rank.TEAM_MEMBER), async (req: AuthenticatedRequest, res
|
||||
if (!media) return res.status(404).json({message: "The provided asset could not be found"});
|
||||
|
||||
if (!(req.user.rank === Rank.TEAM_MEMBER && media.clientId === req.user.clientId || req.user.rank === Rank.ADMIN))
|
||||
return res.status(401).json({message: "You don't have the permission to show information about this link"});
|
||||
return res.status(401).json({message: "You don't have the permission to show information about this media"});
|
||||
|
||||
res.json(media);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user