-
Notifications
You must be signed in to change notification settings - Fork 32
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
Week 7 #24
base: Week_7
Are you sure you want to change the base?
Week 7 #24
Conversation
the commit.
Added Week 7 Items
|
||
|
||
// Verifies password | ||
app.post("/login", async (req, res) => { |
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.
Put these login / register functions in the auth.js and put that under routes
|
||
// Define route and middlewares | ||
const users = express.Router(); | ||
users.use(cors()); |
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.
Could you keep the todo routes in the todo.js file? I think you moved them so you could protect the route via authMiddleware, but you can export the authMiddleware in auth.js
and import the auth middleware function here, then apply the middleware to the specified functions.
No description provided.