Initial commit: NestJS NextJS pnpm monorepo
This commit is contained in:
commit
610dcf202b
175 files changed
+25172
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { StockContentService } from '../stock-content/stock-content.service';
|
||||
import { StockSummaryQuery } from '../_queries/stock-summary.query';
|
||||
|
||||
@Controller('stock-content')
|
||||
export class StockContentController {
|
||||
constructor(
|
||||
private readonly stockService: StockContentService,
|
||||
private readonly stockSummaryQuery: StockSummaryQuery,
|
||||
) { }
|
||||
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.stockService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.stockService.findOne(id);
|
||||
}
|
||||
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.stockService.remove(id);
|
||||
}
|
||||
|
||||
@Get('summary/by-variant')
|
||||
getStockByVariant() {
|
||||
return this.stockSummaryQuery.byArticle();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user