chore(workspace): eradicate all tsc errors and eslint warnings across frontend, admin, and backend
Deploy Canina / deploy (push) Failing after 29s

This commit is contained in:
parsa committed 2026-08-07 07:39:26 +03:30
1 parent 4659a7b1de
commit 9f11d8fb2d
98 files changed
+1272 -1009

No files matched your search

+8 -4
View File
@@ -9,7 +9,8 @@ import {
Query,
UseGuards,
} from '@nestjs/common';
import { CategoriesService } from './categories.service';
import { Prisma } from '@prisma/client';
import { CategoriesService, CategoryQuery } from './categories.service';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import {
ApiTags,
@@ -30,7 +31,7 @@ export class CategoriesController {
@ApiQuery({ name: 'page', required: false, description: 'شماره صفحه' })
@ApiQuery({ name: 'limit', required: false, description: 'تعداد آیتم‌ها' })
@ApiQuery({ name: 'search', required: false, description: 'جستجو در نام' })
async getCategories(@Query() query: any) {
async getCategories(@Query() query: CategoryQuery) {
return this.categoriesService.getCategories(query);
}
@@ -43,14 +44,17 @@ export class CategoriesController {
@Post()
@ApiOperation({ summary: 'ایجاد دسته‌بندی جدید' })
async createCategory(@Body() body: any) {
async createCategory(@Body() body: Prisma.CategoryCreateInput) {
const data = await this.categoriesService.createCategory(body);
return { success: true, data };
}
@Put(':id')
@ApiOperation({ summary: 'ویرایش دسته‌بندی' })
async updateCategory(@Param('id') id: string, @Body() body: any) {
async updateCategory(
@Param('id') id: string,
@Body() body: Prisma.CategoryUpdateInput,
) {
const data = await this.categoriesService.updateCategory(id, body);
return { success: true, data };
}