feat: edicion de usuarios y profesionales desde el admin

Backend: agrega PATCH /users/:id y PATCH /professionals/:id (protegidos).
Admin: pagina de usuario con edicion de nombre/telefono/ciudad/genero;
pagina de profesional con dos secciones editables independientes
(datos personales y perfil profesional).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-27 08:22:40 -05:00
co-authored by Claude Sonnet 4.6
parent e7afbf6d7b
commit abc19505ae
5 changed files with 338 additions and 197 deletions
@@ -59,6 +59,12 @@ export class ProfessionalsService {
return prof;
}
async updateById(id: string, data: any) {
const prof = await this.prisma.professionals.findUnique({ where: { id } });
if (!prof) throw new NotFoundException('Profesional no encontrado');
return this.prisma.professionals.update({ where: { id }, data });
}
async upsert(userId: string, data: any) {
const prof = await this.prisma.professionals.findUnique({ where: { user_id: userId } });
if (!prof) throw new NotFoundException('Debes solicitar ser profesional primero');