You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}catch(e){returnres.status(403).send({message: (easany).message});}if(options.preCreate){try{body=options.preCreate(body,req);}catch(e){returnres.status(400).send({message: `Pre Create error: ${(easany).message}`});}if(body===null){returnres.status(403).send({message: "Pre Create returned null"});}}letdata;try{data=awaitmodel.create(body);}catch(e){returnres.status(400).send({message: (easany).message});}if(options.postCreate){try{awaitoptions.postCreate(data,req);}catch(e){returnres.status(400).send({message: `Post Create error: ${(easany).message}`});}}returnres.status(201).json({data: serialize(data,req.user)});});// TODO add rate limitrouter.get("/",authenticateMiddleware(true),async(req,res)=>{if(!(awaitcheckPermissions("list",options.permissions.list,req.user))){logger.warn(`Access to LIST on ${model.name} denied for ${req.user?.id}`);returnres.status(403).send();}
c108784b4b5a3e5630688e0dc072a3df3e76a55f
The text was updated successfully, but these errors were encountered:
add rate limit
mongoose-rest-framework/src/mongooseRestFramework.ts
Line 622 in 76bc8c3
c108784b4b5a3e5630688e0dc072a3df3e76a55f
The text was updated successfully, but these errors were encountered: