feat: dock PDP buy bar above mobile nav, redesign B2B modal to mobile-card layout, and implement full symptoms CRUD in backend & admin panel
Deploy Canina / deploy (push) Failing after 1m23s
Deploy Canina / deploy (push) Failing after 1m23s
This commit is contained in:
1 parent
8e4388c325
commit
c7b95b4d2b
7 files changed
+555
-69
No files matched your search
@@ -355,18 +355,33 @@ export class AdminController {
|
||||
return { success: true, data: body };
|
||||
}
|
||||
|
||||
|
||||
@Get("symptoms")
|
||||
@ApiOperation({ summary: "لیست کامل علائم درمانی به همراه تعداد محصولات متصل" })
|
||||
async getAllSymptoms() {
|
||||
const data = await this.adminService.getAllSymptoms();
|
||||
return { success: true, data };
|
||||
@ApiOperation({ summary: "لیست کامل علائم درمانی با صفحهبندی، جستجو و متادیتا" })
|
||||
async getSymptoms(@Query() query: { page?: number; limit?: number; search?: string }) {
|
||||
const res = await this.adminService.getSymptoms(query);
|
||||
return { success: true, ...res };
|
||||
}
|
||||
|
||||
@Put("symptoms/rename")
|
||||
@ApiOperation({ summary: "تغییر نام یکپارچه یک علامت در سراسر محصولات و دیتابیس" })
|
||||
async renameSymptom(@Body() body: { oldName: string; newName: string }) {
|
||||
const result = await this.adminService.renameSymptom(body.oldName, body.newName);
|
||||
return result;
|
||||
@Post("symptoms")
|
||||
@ApiOperation({ summary: "افزودن علامت درمانی جدید" })
|
||||
async createSymptom(@Body() body: { name: string; slug?: string; description?: string; metaTitle?: string; metaDescription?: string; keywords?: string }) {
|
||||
const res = await this.adminService.createSymptom(body);
|
||||
return { success: true, data: res };
|
||||
}
|
||||
|
||||
@Put("symptoms/:id")
|
||||
@ApiOperation({ summary: "ویرایش کامل علامت درمانی و متادیتاهای سئو" })
|
||||
async updateSymptom(@Param("id") id: string, @Body() body: any) {
|
||||
const res = await this.adminService.updateSymptom(id, body);
|
||||
return { success: true, data: res };
|
||||
}
|
||||
|
||||
@Delete("symptoms/:id")
|
||||
@ApiOperation({ summary: "حذف علامت درمانی" })
|
||||
async deleteSymptom(@Param("id") id: string) {
|
||||
const res = await this.adminService.deleteSymptom(id);
|
||||
return { success: true, ...res };
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user