WM5 | KARAM ALI | MODULE SERVERS | MAILING LIST API | WEEK 4#186
WM5 | KARAM ALI | MODULE SERVERS | MAILING LIST API | WEEK 4#186kayali436 wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
|
| app.delete("/lists/:name", (req, res) => { | ||
| const params = req.params.name; | ||
| lists.delete(params) | ||
| ? res.status(200).send(`Deleted ${params} successfully!`) |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks
|
|
||
| if (lists.has(params)) { | ||
| lists.set(params, body.members); | ||
| res.send(`List ${params} has been updated`); |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks
| if (params.toLowerCase() !== body.name.toLowerCase()) { | ||
| res | ||
| .status(400) | ||
| .send( |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks
| res.send(`List ${params} has been updated`); | ||
| } else { | ||
| lists.set(params, body.members); | ||
| res.send(`New list ${params} has been created`); |
Check failure
Code scanning / SonarCloud
Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks




Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
I have completed task
Questions
Ask any questions you have for your reviewer.