Fix professional 500 error, add SMTP config UI and message history page
- Fix route ordering in professionals.controller: PATCH me was captured by PATCH :id causing 500 - Admin settings: add SMTP email config section (host, port, user, pass, sender) - Admin sidebar: add Mensajes link - Admin: new /mensajes page with SMS/email history, channel filter and pagination Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6da45ac9d1
commit
ce769dfe8d
@@ -60,6 +60,28 @@ export class ProfessionalsController {
|
||||
return this.pros.findByUserId(req.user.sub);
|
||||
}
|
||||
|
||||
@Post('request')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
request(@Req() req, @Body() dto: CreateProfessionalDto) {
|
||||
return this.pros.requestProfessional(req.user.sub, dto);
|
||||
}
|
||||
|
||||
@Patch('me/schedules')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
async updateSchedules(@Req() req, @Body() dto: UpdateSchedulesDto) {
|
||||
const prof = await this.pros.findByUserId(req.user.sub);
|
||||
return this.pros.updateSchedules(prof.id, dto.schedules);
|
||||
}
|
||||
|
||||
@Patch('me')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
async update(@Req() req, @Body() dto: UpdateProfessionalDto) {
|
||||
return this.pros.upsert(req.user.sub, dto);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@@ -71,26 +93,4 @@ export class ProfessionalsController {
|
||||
findById(@Param('id') id: string) {
|
||||
return this.pros.findById(id);
|
||||
}
|
||||
|
||||
@Post('request')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
request(@Req() req, @Body() dto: CreateProfessionalDto) {
|
||||
return this.pros.requestProfessional(req.user.sub, dto);
|
||||
}
|
||||
|
||||
@Patch('me')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
async update(@Req() req, @Body() dto: UpdateProfessionalDto) {
|
||||
return this.pros.upsert(req.user.sub, dto);
|
||||
}
|
||||
|
||||
@Patch('me/schedules')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
async updateSchedules(@Req() req, @Body() dto: UpdateSchedulesDto) {
|
||||
const prof = await this.pros.findByUserId(req.user.sub);
|
||||
return this.pros.updateSchedules(prof.id, dto.schedules);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user