issues
search
timjacksonm
/
Toss-Up
A would you rather question app. Questions generated using AI technology
https://toss-up.vercel.app
2
stars
1
forks
source link
BE: Users & Register API Endpoints
#37
Closed
timjacksonm
closed
1 year ago
timjacksonm
commented
1 year ago
Installed bcrypt and joi npm packages
Created endpoint file in /api/auth/signup.ts
Updated prisma schema to have password property in User document
Updated password validation rules in validate.ts
Refactored and renamed Users.findOne to findUser which can find a user by email or name
Added Users.createUser function
Updated nextauth config file to use the new findUser function
Fix NextAuth.ts error ticket #40
[x] Setup GET /api/users
[x] Setup GET /api/users/
[x] Setup PUT /api/users/ (only updating user details, no password updates for now)
Setup Register API endpoint #5
[x] Setup /api/auth/signup (register endpoint)
[x] Add (middleware) to validate and sanitize the req.body
Fix NextAuth.ts error ticket #40
Setup Register API endpoint #5