Back to Bricks
User Profile
UsersEndpoints for users to manage their own profile, including password updates and avatar uploads.
userprofileaccountsettingsAuth Required
Backend:
prisma/schema.prismajavascript
1 Paste Guide
Copy files to:
prisma/schema.prisma (append models)repositories/profile.repo.jscontrollers/profileController.jsroutes/profileRoutes.jsAdd to server.js:
app.use('/api/profile', require('./routes/profileRoutes'));Stack
PrismaExpress
Test Examples
curl http://localhost:5000/api/profile/me -H "Authorization: Bearer TOKEN"curl -X PUT http://localhost:5000/api/profile/details -H "Authorization: Bearer TOKEN" -d '{"name": "New Name"}'