small changes to project config

This commit is contained in:
Joe Arndt 2025-12-10 18:29:45 -06:00
parent 7011e44662
commit 085e84b086
5 changed files with 34 additions and 30 deletions

View file

@ -1,4 +1,5 @@
{ {
"singleQuote": true, "singleQuote": true,
"trailingComma": "all" "trailingComma": "none",
"printWidth": 160
} }

View file

@ -5,7 +5,7 @@ meta {
} }
get { get {
url: {{localBaseUrl}}/health url: {{localBaseUrl}}/expenses
body: none body: none
auth: inherit auth: inherit
} }

View file

@ -1,19 +1,19 @@
import { PartialType } from '@nestjs/mapped-types'; import { PartialType } from '@nestjs/mapped-types';
export class CreateExpenseDto { export class CreateExpenseDto {
year: string; year: string;
month: string; month: string;
day: string; day: string;
cents: number; cents: number;
category: string; category: string;
subcategory?: string[]; merchant: string;
merchant?: string; subcategory: string[];
tags?: string[]; tags: string[];
description?: string; description?: string;
} }
export class UpdateExpenseDto extends PartialType(CreateExpenseDto) { } export class UpdateExpenseDto extends PartialType(CreateExpenseDto) { }
export class GetExpenseDto extends CreateExpenseDto{ export class GetExpenseDto extends CreateExpenseDto{
id: number; id: number;
} }

View file

@ -21,13 +21,13 @@ export class ExpensesController {
return this.expensesService.findOne(+id); return this.expensesService.findOne(+id);
} }
@Patch(':id') // @Patch(':id')
update(@Param('id') id: string, @Body() updateExpenseDto: UpdateExpenseDto) { // update(@Param('id') id: string, @Body() updateExpenseDto: UpdateExpenseDto) {
return this.expensesService.update(+id, updateExpenseDto); // return this.expensesService.update(+id, updateExpenseDto);
} // }
//
@Delete(':id') // @Delete(':id')
remove(@Param('id') id: string) { // remove(@Param('id') id: string) {
return this.expensesService.remove(+id); // return this.expensesService.remove(+id);
} // }
} }

View file

@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Expense } from '../controllers/expenses/expense.entities'; import { Expense } from '../controllers/expenses/expense.entities';
import {CreateExpenseDto, GetExpenseDto, UpdateExpenseDto} from '../controllers/expenses/expense.dto'; import { CreateExpenseDto, GetExpenseDto, UpdateExpenseDto } from '../controllers/expenses/expense.dto';
@Injectable() @Injectable()
export class ExpensesService { export class ExpensesService {
@ -11,7 +11,10 @@ export class ExpensesService {
month: '12', month: '12',
day: '10', day: '10',
cents: 987, cents: 987,
category: 'Automotive' category: 'Automotive',
merchant: '',
subcategory: [],
tags: []
} }
]; ];
@ -27,11 +30,11 @@ export class ExpensesService {
return `This action returns a #${id} expense`; return `This action returns a #${id} expense`;
} }
update(id: number, updateExpenseDto: UpdateExpenseDto) { // update(id: number, updateExpenseDto: UpdateExpenseDto) {
return `This action updates a #${id} expense`; // return `This action updates a #${id} expense`;
} // }
//
remove(id: number) { // remove(id: number) {
return `This action removes a #${id} expense`; // return `This action removes a #${id} expense`;
} // }
} }