feat: add isAdmin column to token entity; implement migration for isAdmin; enhance logging and error handling in query execution; update query plugin to support new logging structure
This commit is contained in:
@ -35,7 +35,7 @@ export class DatabasePlugin extends Plugin {
|
||||
enableKeepAlive: true,
|
||||
});
|
||||
|
||||
await dbConnection.query("SET SESSION MAX_EXECUTION_TIME=2000;");
|
||||
// await dbConnection.query("SET SESSION MAX_EXECUTION_TIME=2000;");
|
||||
|
||||
return new DatabasePlugin(name, dbConnection);
|
||||
}
|
||||
|
||||
@ -15,11 +15,7 @@ export class QueryPlugin extends Plugin {
|
||||
return new QueryPlugin("query", query, queryExecuterService);
|
||||
}
|
||||
|
||||
async run(data: {
|
||||
token: string;
|
||||
queryData: any;
|
||||
headers?: Record<string, any>;
|
||||
}): Promise<any> {
|
||||
async run(id: string, data: any): Promise<any> {
|
||||
const query = await this.QueryExecuterService.queryRepository.findOne({
|
||||
where: { id: this.query.id },
|
||||
});
|
||||
@ -35,9 +31,11 @@ export class QueryPlugin extends Plugin {
|
||||
}
|
||||
|
||||
return await this.QueryExecuterService.runQuery(
|
||||
query.id,
|
||||
data.queryData,
|
||||
data.headers
|
||||
id,
|
||||
data,
|
||||
this.headers,
|
||||
this.cookies,
|
||||
this.log
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user