Add rejection retry flow with configurable wait days

- Backend: DELETE /professionals/me resets rejected state so user can retry
- Backend: findRejected/findPending now filter by pro_state
- Admin settings: rejection_wait_days field (default 7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-28 18:03:13 -05:00
co-authored by Claude Sonnet 4.6
parent 3fd7a33fc1
commit 0899105a52
3 changed files with 45 additions and 2 deletions
@@ -1,4 +1,4 @@
import { Controller, Get, Post, Patch, Param, Body, UseGuards, Req, HttpCode, HttpStatus, NotFoundException } from '@nestjs/common';
import { Controller, Get, Post, Patch, Delete, Param, Body, UseGuards, Req, HttpCode, HttpStatus, NotFoundException } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { ProfessionalsService } from './professionals.service';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
@@ -76,6 +76,13 @@ export class ProfessionalsController {
return this.pros.requestProfessional(req.user.sub, dto);
}
@Delete('me')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()
async deleteMe(@Req() req) {
return this.pros.resetRejected(req.user.sub);
}
@Patch('me/schedules')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth()