[HOTFIX] Auth Credential Failure check

This commit is contained in:
Dunemask 2024-03-29 12:39:44 -06:00
parent 40f020d27b
commit 626ebf9d1d
2 changed files with 23 additions and 5 deletions

View file

@ -16,7 +16,10 @@ const getMclName = (host, id) =>
`${host.toLowerCase().replaceAll(".", "-")}-${id}`;
export async function checkAuthorization(serverId, cairoId) {
if(!cairoId) return false;
console.log(
`Checking Authorization for user ${cairoId} for serverId ${serverId}`,
);
if (!cairoId) return false;
const q = selectWhereAllQuery(table, {
id: serverId,
owner_cairo_id: cairoId,