small changes to project config
This commit is contained in:
parent
7011e44662
commit
085e84b086
5 changed files with 34 additions and 30 deletions
|
|
@ -1,19 +1,19 @@
|
|||
import { PartialType } from '@nestjs/mapped-types';
|
||||
|
||||
export class CreateExpenseDto {
|
||||
year: string;
|
||||
month: string;
|
||||
day: string;
|
||||
cents: number;
|
||||
category: string;
|
||||
subcategory?: string[];
|
||||
merchant?: string;
|
||||
tags?: string[];
|
||||
description?: string;
|
||||
year: string;
|
||||
month: string;
|
||||
day: string;
|
||||
cents: number;
|
||||
category: string;
|
||||
merchant: string;
|
||||
subcategory: string[];
|
||||
tags: string[];
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export class UpdateExpenseDto extends PartialType(CreateExpenseDto) { }
|
||||
|
||||
export class GetExpenseDto extends CreateExpenseDto{
|
||||
id: number;
|
||||
id: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ export class ExpensesController {
|
|||
return this.expensesService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateExpenseDto: UpdateExpenseDto) {
|
||||
return this.expensesService.update(+id, updateExpenseDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.expensesService.remove(+id);
|
||||
}
|
||||
// @Patch(':id')
|
||||
// update(@Param('id') id: string, @Body() updateExpenseDto: UpdateExpenseDto) {
|
||||
// return this.expensesService.update(+id, updateExpenseDto);
|
||||
// }
|
||||
//
|
||||
// @Delete(':id')
|
||||
// remove(@Param('id') id: string) {
|
||||
// return this.expensesService.remove(+id);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue