Major refactoring: Add user id to API routes
This commit is contained in:
@@ -8,6 +8,7 @@ const http = require("http");
|
||||
* @property {string} host
|
||||
* @property {number | string} port
|
||||
* @property {typeof http | typeof https} scheme
|
||||
* @property {string | number} user_id
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -29,6 +30,7 @@ function grabHostNames() {
|
||||
host: remoteHost || localHost || "datasquirel.com",
|
||||
port: remoteHostPort || localHostPort || 443,
|
||||
scheme: scheme?.match(/^http$/i) ? http : https,
|
||||
user_id: String(process.env.DSQL_API_USER_ID || 0),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user