This commit is contained in:
Ahmed Bouhuolia
2026-01-12 01:04:28 +02:00
parent 16f1d57279
commit 3c1273becb
32 changed files with 180 additions and 132 deletions

View File

@@ -3,7 +3,7 @@ import {
Get,
Query,
Param,
Post,
Patch,
ParseIntPipe,
} from '@nestjs/common';
import { ApiTags, ApiOperation, ApiParam } from '@nestjs/swagger';
@@ -27,7 +27,7 @@ export class ContactsController {
return this.getAutoCompleteService.autocompleteContacts(query);
}
@Post(':id/activate')
@Patch(':id/activate')
@ApiOperation({ summary: 'Activate a contact' })
@ApiParam({ name: 'id', type: 'number', description: 'Contact ID' })
async activateContact(@Param('id', ParseIntPipe) contactId: number) {
@@ -35,7 +35,7 @@ export class ContactsController {
return { id: contactId, activated: true };
}
@Post(':id/inactivate')
@Patch(':id/inactivate')
@ApiOperation({ summary: 'Inactivate a contact' })
@ApiParam({ name: 'id', type: 'number', description: 'Contact ID' })
async inactivateContact(@Param('id', ParseIntPipe) contactId: number) {