West Midlands | July - SDC | Gabriel Deng | Sprint 3 | Middleware exercises #32
West Midlands | July - SDC | Gabriel Deng | Sprint 3 | Middleware exercises #32gai93003 wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
4 similar comments
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
There are too many files committed here for me to review,could you take another look and make sure only the relevant ones are pushed? Thanks |
|
Thanks @LonMcGregor, i have changes the files that i wanted to commit. |
|
Hi, I still can't open the request interface on github because it is too full. If you look on this webpage at the top, you see it still says "300+". You might need to untrack or ignore a node_modules folder or something similar to fix this. |
|
Thank you @LonMcGregor, I have removed the node modules and added them into .gitignore |
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start on the middleware task, I've left a comment for how you could improve.
Can you remove the prep exercises as I don't think they are part of the middleware task
| console.log('req.body =', req.body); | ||
|
|
||
| let userMessage = 'No subjects requested'; | ||
| if (Array.isArray(req.body) && req.body.length > 0) { |
There was a problem hiding this comment.
Do you remember the goal of middleware? Middleware functions are designed to do very small task specific functions. This task is trying to do at least 3 things: get the username header, check the body is an array, and prepare the return value. Can you split these up into more middleware-like functions?
Learners, PR Template
Self checklist