mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
7 lines
222 B
JavaScript
Executable File
7 lines
222 B
JavaScript
Executable File
export default (req, res, next) => {
|
|
if (!req.user.roles.includes("admin")) {
|
|
return res.status(403).json({ error: "To make this request it is necessary to have administrator permissions" })
|
|
}
|
|
|
|
next()
|
|
} |