mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
fix middleware using next()
casues duplicate calls
This commit is contained in:
parent
c7f3cb9862
commit
613c940c69
@ -1,4 +1,4 @@
|
||||
export default async (req, res, next) => {
|
||||
export default async (req, res) => {
|
||||
if (!req.auth) {
|
||||
return res.status(401).json({ error: "No authenticated" })
|
||||
}
|
||||
@ -9,5 +9,5 @@ export default async (req, res, next) => {
|
||||
return res.status(403).json({ error: "To make this request it is necessary to have administrator permissions" })
|
||||
}
|
||||
|
||||
next()
|
||||
return
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user