Updates
This commit is contained in:
@@ -24,10 +24,11 @@ const grabApiCred: CheckApiCredentialsFn = ({
|
||||
);
|
||||
|
||||
const ApiJSON = decrypt({ encryptedString: key });
|
||||
/** @type {import("../../types").ApiKeyObject} */
|
||||
|
||||
const ApiObject: import("../../types").ApiKeyObject = JSON.parse(
|
||||
ApiJSON || ""
|
||||
);
|
||||
|
||||
const isApiKeyValid = fs.existsSync(
|
||||
`${allowedKeysPath}/${ApiObject.sign}`
|
||||
);
|
||||
@@ -50,7 +51,7 @@ const grabApiCred: CheckApiCredentialsFn = ({
|
||||
.includes(String(table));
|
||||
if (isTableAllowed) return ApiObject;
|
||||
return null;
|
||||
} catch (/** @type {any} */ error: any) {
|
||||
} catch (error: any) {
|
||||
console.log(`api-cred ERROR: ${error.message}`);
|
||||
return { error: `api-cred ERROR: ${error.message}` };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user