feat: implement command functionality with new CommandController, update Query entity, and enhance query execution with headers support

This commit is contained in:
lborv
2025-10-02 10:02:44 +03:00
parent e53e3cf92c
commit efbb9f5c21
11 changed files with 122 additions and 11 deletions

View File

@ -13,7 +13,10 @@ export class QueryHandlerService {
private readonly projectService: ProjectService
) {}
async createQuery(queryData: { projectToken: string; source: string }) {
async createQuery(
queryData: { projectToken: string; source: string },
isCommand = false
) {
const project = await this.projectService.findById(queryData.projectToken);
if (!project) {
@ -21,6 +24,7 @@ export class QueryHandlerService {
}
queryData["project"] = project;
queryData["isCommand"] = isCommand ? 1 : 0;
delete queryData.projectToken;
const query = this.queryRepository.create(queryData);