chore(workspace): eradicate all tsc errors and eslint warnings across frontend, admin, and backend
Deploy Canina / deploy (push) Failing after 29s
Deploy Canina / deploy (push) Failing after 29s
This commit is contained in:
1 parent
4659a7b1de
commit
9f11d8fb2d
98 files changed
+1272
-1009
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
Param,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import { SmartAdvisorService } from './smart-advisor.service';
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
@@ -30,7 +31,7 @@ export class SmartAdvisorController {
|
||||
@ApiBearerAuth()
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'ایجاد قانون جدید دستیار هوشمند (نیازمند ادمین)' })
|
||||
create(@Body() body: any) {
|
||||
create(@Body() body: Prisma.SmartAdvisorRuleCreateInput) {
|
||||
return this.smartAdvisorService.create(body);
|
||||
}
|
||||
|
||||
@@ -39,7 +40,10 @@ export class SmartAdvisorController {
|
||||
@ApiBearerAuth()
|
||||
@Patch(':id')
|
||||
@ApiOperation({ summary: 'ویرایش قانون دستیار هوشمند (نیازمند ادمین)' })
|
||||
update(@Param('id') id: string, @Body() body: any) {
|
||||
update(
|
||||
@Param('id') id: string,
|
||||
@Body() body: Prisma.SmartAdvisorRuleUpdateInput,
|
||||
) {
|
||||
return this.smartAdvisorService.update(id, body);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,9 @@ export class SmartAdvisorService {
|
||||
}
|
||||
|
||||
async update(id: string, data: Prisma.SmartAdvisorRuleUpdateInput) {
|
||||
const rule = await this.prisma.smartAdvisorRule.findUnique({ where: { id } });
|
||||
const rule = await this.prisma.smartAdvisorRule.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
if (!rule) {
|
||||
throw new NotFoundException(`SmartAdvisorRule with ID ${id} not found`);
|
||||
}
|
||||
@@ -32,7 +34,9 @@ export class SmartAdvisorService {
|
||||
}
|
||||
|
||||
async remove(id: string) {
|
||||
const rule = await this.prisma.smartAdvisorRule.findUnique({ where: { id } });
|
||||
const rule = await this.prisma.smartAdvisorRule.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
if (!rule) {
|
||||
throw new NotFoundException(`SmartAdvisorRule with ID ${id} not found`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user