Major refactoring: Add user id to API routes

This commit is contained in:
Benjamin Toby
2024-11-27 11:02:03 +01:00
parent a529d0bd08
commit b047d6557c
21 changed files with 144 additions and 49 deletions
@@ -39,7 +39,7 @@ async function updateApiSchemaFromLocalDb() {
const key = process.env.DSQL_KEY || "";
const dbSchema = JSON.parse(fs.readFileSync(dbSchemaPath, "utf8"));
const { host, port, scheme } = grabHostNames();
const { host, port, scheme, user_id } = grabHostNames();
/**
* Make https request
@@ -79,7 +79,7 @@ async function updateApiSchemaFromLocalDb() {
},
port,
hostname: host,
path: `/api/query/update-schema-from-single-database`,
path: `/api/query/${user_id}/update-schema-from-single-database`,
},
/**