This commit is contained in:
2026-02-04 13:49:07 +03:30
parent 5fd6611aca
commit de14d531e1
222 changed files with 7053 additions and 57956 deletions
-34
View File
@@ -1,34 +0,0 @@
import { Controller, Get, Param, Query } from '@nestjs/common'
import { PosService } from './pos.service'
@Controller('pos')
export class PosController {
constructor(private readonly posService: PosService) {}
@Get('/:posId')
getInfo(@Param('posId') posId: string) {
return this.posService.getInfo(Number(posId))
}
@Get('/:posId/stock')
async getStock(
@Param('posId') posId: string,
@Query('isAvailable') isAvailable?: string,
@Query('page') page?: string,
@Query('pageSize') pageSize?: string,
@Query('q') q?: string,
) {
const options = {
isAvailable: isAvailable ? isAvailable === 'true' : undefined,
page: page ? Number(page) : undefined,
pageSize: pageSize ? Number(pageSize) : undefined,
q,
}
return this.posService.getStock(Number(posId), options)
}
@Get('/:posId/product-categories')
async getProductCategories(@Param('posId') posId: string) {
return this.posService.getProductCategories(Number(posId))
}
}