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:
@ -2,11 +2,11 @@
|
||||
// import createDatabase from "../functions/createDatabase";
|
||||
// import createDatabaseNode from "../functions/createDatabaseNode";
|
||||
// import createProject from "../functions/createProject";
|
||||
import createQuery from "../functions/createQuery";
|
||||
// import createQuery from "../functions/createQuery";
|
||||
// import databaseMigrationUp from "../functions/databaseMigrationUp";
|
||||
import runQuery from "../functions/runQuery";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
// import * as fs from "fs";
|
||||
// import * as path from "path";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
@ -34,15 +34,17 @@ import * as path from "path";
|
||||
|
||||
// console.log("Migrations applied:", migrationResult);
|
||||
|
||||
const payloadPath = path.join(__dirname, "case1-payload.js");
|
||||
const query = await createQuery(
|
||||
{ token: "04c38f93-f2fb-4d2c-a8e2-791effa35239" },
|
||||
fs.readFileSync(payloadPath, { encoding: "utf-8" })
|
||||
);
|
||||
// const payloadPath = path.join(__dirname, "case1-payload.js");
|
||||
// const query = await createQuery(
|
||||
// { token: "c69c2c75-9b30-4aa5-9641-0a931f5aad40" },
|
||||
// fs.readFileSync(payloadPath, { encoding: "utf-8" })
|
||||
// );
|
||||
|
||||
console.log(query);
|
||||
// console.log(query);
|
||||
|
||||
const result = await runQuery(query.id, { id: 1 });
|
||||
const result = await runQuery("66e651f0-261b-4ebd-9749-077abffaddc2", {
|
||||
id: 1,
|
||||
});
|
||||
|
||||
console.log("Query Result:", result.data);
|
||||
console.log("headers:", result.headers);
|
||||
|
||||
Reference in New Issue
Block a user