[BACKUP] Store typescript adjustments

This commit is contained in:
Dunemask 2024-05-14 21:20:22 -06:00
parent 813295c857
commit 5a43691d83
11 changed files with 52 additions and 46 deletions

View file

@ -7,6 +7,7 @@ import {
updateWhereAllQuery,
} from "../pg-query.js";
import ExpressClientError from "../../util/ExpressClientError.js";
import { VERB } from "@mcl/logging";
const table = "servers";
const asExpressClientError = (e) => {
@ -17,9 +18,8 @@ const getMclName = (host, id) =>
`${host.toLowerCase().replaceAll(".", "-")}-${id}`;
export async function checkAuthorization(serverId, cairoId) {
console.log(
`Checking Authorization for user ${cairoId} for serverId ${serverId}`,
);
const msgLog = `Checking Authorization for user ${cairoId} for serverId ${serverId}`;
VERB("DEBUG", msgLog);
if (!cairoId) return false;
const q = selectWhereAllQuery(table, {
id: serverId,