feat: implement command functionality with new CommandController, update Query entity, and enhance query execution with headers support
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user