feat: PantryItem (Baslager) - tabell, backend-modul och frontend-sida

This commit is contained in:
Nils-Johan Gynther
2026-04-15 22:06:40 +02:00
parent 65ec74ac7d
commit 47d1aafd9e
12 changed files with 373 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post } from '@nestjs/common';
import { PantryService } from './pantry.service';
import { CreatePantryItemDto } from './dto/create-pantry-item.dto';
@Controller('pantry')
export class PantryController {
constructor(private readonly pantryService: PantryService) {}
@Get()
findAll() {
return this.pantryService.findAll();
}
@Post()
create(@Body() body: CreatePantryItemDto) {
return this.pantryService.create(body);
}
@Delete(':id')
remove(@Param('id', ParseIntPipe) id: number) {
return this.pantryService.remove(id);
}
}