-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deleteAdmin Api fix issue #952 #969
deleteAdmin Api fix issue #952 #969
Conversation
router.post('/faq', validation(FAQValidationSchema), faq); | ||
router.get('/getFaq', getfaq); | ||
router.put('/deleteFaq', deleteFaq); | ||
router.put('/deleteFaq',authMiddleware, deleteFaq); |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
const error = new ErrorHandler(constants.ERRORS.DATABASE, { | ||
statusCode: 500, | ||
message: `You don't have the required permissions`, | ||
errStack: '', | ||
}); | ||
return next(error); | ||
} | ||
const [err] = await to(Admin.findById(userId)); | ||
const [err] = await to(faq.findByIdAndDelete(faqId)); |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add screenshot/video testing the functionality?
Issue that this pull request solves
Closes: #952
Proposed changes
deleteFaq api expecting adminId fix
Brief description of what is fixed or changed
deleteFaq api expecting adminId fix
Types of changes
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that applyScreenshots
Please attach the screenshots of the changes made in case of change in user interface
Other information
Any other information that is important to this pull request