Skip to content

Commit

Permalink
backend: created user model and authMiddleware
Browse files Browse the repository at this point in the history
This commit adds:
- User Model: Created with name and password fields.
- Auth Middleware: JWT authentication middleware.
- User controller: Login and Register user.
- Auth Endpoints: Register and login endpoints.

Fixes: #62
  • Loading branch information
sethdivyansh committed Jun 8, 2024
1 parent 19833bd commit 6e3aa82
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed backend/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/src/middlewares/authMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import jwt from 'jsonwebtoken';
import User, { IUser } from '../models/userModel';
import { User, IUser } from '../models/userModel';
import { NextFunction, Request, Response } from 'express';

export interface AuthRequest extends Request {
Expand Down

0 comments on commit 6e3aa82

Please sign in to comment.