mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
refactor: import resource module to nestjs
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
import { Body, Controller, Delete, Param, Post, Put } from '@nestjs/common';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
} from '@nestjs/common';
|
||||
import { CreditNoteApplication } from './CreditNoteApplication.service';
|
||||
import {
|
||||
ICreditNoteEditDTO,
|
||||
ICreditNoteNewDTO,
|
||||
ICreditNotesQueryDTO,
|
||||
} from './types/CreditNotes.types';
|
||||
import { PublicRoute } from '../Auth/Jwt.guard';
|
||||
|
||||
@@ -19,6 +29,11 @@ export class CreditNotesController {
|
||||
return this.creditNoteApplication.createCreditNote(creditNoteDTO);
|
||||
}
|
||||
|
||||
@Get()
|
||||
getCreditNotes(@Query() creditNotesQuery: ICreditNotesQueryDTO) {
|
||||
return this.creditNoteApplication.getCreditNotes(creditNotesQuery);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
editCreditNote(
|
||||
@Param('id') creditNoteId: number,
|
||||
|
||||
Reference in New Issue
Block a user