Progress on API routes

This commit is contained in:
2026-02-02 03:35:41 -05:00
parent 82128e444e
commit 7bd0bbe2d8
15 changed files with 927 additions and 99 deletions

View File

@@ -0,0 +1,22 @@
import { Body, Controller, Delete, Inject, Param, Post } from '@nestjs/common';
import { EntryService } from './entries.service';
import { EntryDTO } from './entries.dto';
@Controller('entries')
export class EntriesController {
constructor(
@Inject(EntryService)
private readonly entryService: EntryService
) {}
@Post()
async saveEntry(@Body() entry: EntryDTO) {
return (await this.entryService.save(entry)).uuid
}
@Delete(":uuid")
async softDelete(@Param("uuid") uuid: string): Promise<void>
{
await this.entryService.softDeleteByUuid(uuid)
}
}