-
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
[Backend] Auth remove for post contact us Fixed #963
Conversation
@Kajol-Kumari when you have a free time please check and merge it. |
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.
@Hemu21 as this is for a level2 issue, can you also add middle ware here - https://github.com/HITK-TECH-Community/Community-Website/blob/main/backend/app/routes/joinUs/index.js#L10
the delete and get call should only be accessible to admins
@@ -7,7 +7,7 @@ const deleteContactUs = require('./delete'); | |||
const { authMiddleware } = require('../../../helpers/middlewares/auth'); | |||
|
|||
router.get('/getcontactus', getContact); |
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 u add the authMiddleware here as only admins should be able to fetch this data
@Kajol-Kumari updated can you please check. |
router.get('/getcontactus', getContact); | ||
router.post('/',authMiddleware, validation(contactValidationSchema), postContact); | ||
router.delete("/deleteContactUs",authMiddleware, deleteContactUs); | ||
router.get('/getcontactus', authMiddleware, getContact); |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
router.delete("/deleteContactUs",authMiddleware, deleteContactUs); | ||
router.get('/getcontactus', authMiddleware, getContact); | ||
router.post('/', validation(contactValidationSchema), postContact); | ||
router.delete('/deleteContactUs', authMiddleware, deleteContactUs); |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
router.delete("/deleteContactUs",authMiddleware, deleteContactUs); | ||
router.get('/getcontactus', authMiddleware, getContact); | ||
router.post('/', validation(contactValidationSchema), postContact); | ||
router.delete('/deleteContactUs', authMiddleware, deleteContactUs); |
Check failure
Code scanning / CodeQL
Missing rate limiting High
a database access
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.
LGTM
Issue that this pull request solves
Issue Link resolve #957
Closes: #957
Brief description of what is fixed or changed
Post contact us doesn't need auth, why because user post the data using contact us. Because of authentication user unable to post the data from contact us page. Now post contact us works fine.
Types of changes
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply