[DEBUG] Minecluster Auth Errors
This commit is contained in:
parent
87e87f89d3
commit
2ba97fcb70
1 changed files with 3 additions and 0 deletions
|
@ -16,10 +16,13 @@ const getMclName = (host, id) =>
|
||||||
`${host.toLowerCase().replaceAll(".", "-")}-${id}`;
|
`${host.toLowerCase().replaceAll(".", "-")}-${id}`;
|
||||||
|
|
||||||
export async function checkAuthorization(serverId, cairoId) {
|
export async function checkAuthorization(serverId, cairoId) {
|
||||||
|
console.log(`Checking Authorization for user ${cairoId} for serverId ${serverId}`);
|
||||||
const q = selectWhereAllQuery(table, {
|
const q = selectWhereAllQuery(table, {
|
||||||
id: serverId,
|
id: serverId,
|
||||||
owner_cairo_id: cairoId,
|
owner_cairo_id: cairoId,
|
||||||
});
|
});
|
||||||
|
const queryRes = await pg.query(q);
|
||||||
|
console.log(`Server returned, ${JSON.stringify(queryRes)}`);
|
||||||
return (await pg.query(q)).length === 1;
|
return (await pg.query(q)).length === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue