chore(prettier): fix all files

This commit is contained in:
Elian Doran
2025-01-09 18:07:02 +02:00
parent 19ee861699
commit 4cbb529fd4
571 changed files with 23226 additions and 23940 deletions

View File

@@ -8,7 +8,7 @@ function getTokens() {
}
function getTokenHash(token: crypto.BinaryLike) {
return crypto.createHash('sha256').update(token).digest('base64');
return crypto.createHash("sha256").update(token).digest("base64");
}
function createToken(tokenName: string) {
@@ -52,14 +52,12 @@ function parseAuthToken(auth: string | undefined) {
if (chunks.length === 1) {
return { token: auth }; // legacy format without etapiTokenId
}
else if (chunks.length === 2) {
} else if (chunks.length === 2) {
return {
etapiTokenId: chunks[0],
token: chunks[1]
}
}
else {
};
} else {
return null; // wrong format
}
}
@@ -81,8 +79,7 @@ function isValidAuthHeader(auth: string | undefined) {
}
return etapiToken.tokenHash === authTokenHash;
}
else {
} else {
for (const etapiToken of becca.getEtapiTokens()) {
if (etapiToken.tokenHash === authTokenHash) {
return true;