feat: enhance API and query handling with Redis caching; add QueryGuard for query validation; refactor services to utilize RedisClient for improved performance

This commit is contained in:
Boris D
2025-10-10 10:51:52 +03:00
parent 45db65cec8
commit ca134414b0
20 changed files with 228 additions and 64 deletions

View File

@ -0,0 +1,22 @@
import { Controller, Inject, Post, UseGuards } from "@nestjs/common";
import { ApiTokenGuard } from "src/api/guards/api-token.guard";
import { FunctionService } from "./function.service";
@Controller("functions")
@UseGuards(ApiTokenGuard)
export class FunctionController {
constructor(
@Inject(FunctionService)
private readonly functionService: FunctionService
) {}
@Post("create")
async createFunction(projectId: string, name: string, source: string) {
return this.functionService.create(projectId, name, source);
}
@Post("delete")
async deleteFunction(projectId: string, name: string) {
return this.functionService.deleteFunction(projectId, name);
}
}