feat: implement AdminGuard and QueryGuard for enhanced access control; refactor API and query handling; add deleteQuery method in QueryHandlerService; update QueryResponse type for improved response handling
This commit is contained in:
@ -1,7 +1,18 @@
|
||||
import { Body, Controller, Delete, Inject, Post } from "@nestjs/common";
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Inject,
|
||||
Post,
|
||||
UseGuards,
|
||||
} from "@nestjs/common";
|
||||
import { ApiService } from "./api.service";
|
||||
import { AdminGuard } from "./guards/admin.guard";
|
||||
import { ApiTokenGuard } from "./guards/api-token.guard";
|
||||
|
||||
@Controller("api")
|
||||
@UseGuards(ApiTokenGuard)
|
||||
@UseGuards(AdminGuard)
|
||||
export class ApiController {
|
||||
constructor(
|
||||
@Inject(ApiService)
|
||||
|
||||
Reference in New Issue
Block a user