refactor: migrate to Nestjs

This commit is contained in:
Ahmed Bouhuolia
2024-12-30 15:54:53 +02:00
parent 77bbf6828d
commit 515a984714
23 changed files with 557 additions and 175 deletions

View File

@@ -4,8 +4,10 @@ import {
ICreditNoteEditDTO,
ICreditNoteNewDTO,
} from './types/CreditNotes.types';
import { PublicRoute } from '../Auth/Jwt.guard';
@Controller('credit-notes')
@PublicRoute()
export class CreditNotesController {
/**
* @param {CreditNoteApplication} creditNoteApplication - The credit note application service.
@@ -28,7 +30,7 @@ export class CreditNotesController {
);
}
@Post(':id/open')
@Put(':id/open')
openCreditNote(@Param('id') creditNoteId: number) {
return this.creditNoteApplication.openCreditNote(creditNoteId);
}