Fix Admin panel categories modal, add error handling, enforce cursor-pointer globally

This commit is contained in:
parsa committed 2026-06-12 21:57:09 +03:30
1 parent 69502fc380
commit 82ab454647
47 files changed
+2968 -653

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { Controller, Get, Post, Put, Delete, Body, Param, Query, UseGuards } from '@nestjs/common';
import { WikiService } from './wiki.service';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
@UseGuards(JwtAuthGuard)
@Controller('admin/wiki')
export class WikiController {
constructor(private readonly wikiService: WikiService) {}
@Get()
async getTerms(@Query() query: any) {
return this.wikiService.getTerms(query);
}
@Post()
async createTerm(@Body() body: any) {
const data = await this.wikiService.createTerm(body);
return { success: true, data };
}
@Put(':key')
async updateTerm(@Param('key') key: string, @Body() body: any) {
const data = await this.wikiService.updateTerm(key, body);
return { success: true, data };
}
@Delete(':key')
async deleteTerm(@Param('key') key: string) {
await this.wikiService.deleteTerm(key);
return { success: true };
}
}