chore (backend): accept linter suggestions

This commit is contained in:
naskya 2024-06-06 17:10:40 +09:00
parent b6c16b4e29
commit 5cbb172dbf
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
3 changed files with 5 additions and 5 deletions

View file

@ -25,6 +25,6 @@ export async function workerMain() {
if (cluster.isWorker) {
// Send a 'ready' message to parent process
process.send!("ready");
process.send?.("ready");
}
}

View file

@ -75,7 +75,7 @@ export default define(meta, paramDef, async (ps, user) => {
const credentialIdLength = authData.readUInt16BE(53);
const credentialId = authData.slice(55, 55 + credentialIdLength);
const publicKeyData = authData.slice(55 + credentialIdLength);
const publicKey: Map<Number, any> = new Map(
const publicKey: Map<number, any> = new Map(
Object.entries(decode(publicKeyData)).map(([key, value]) => [
Number(key),
value,

View file

@ -27,9 +27,9 @@ export default async (ctx: Koa.Context) => {
ctx.set("Access-Control-Allow-Credentials", "true");
const body = ctx.request.body as any;
const username = body["username"];
const password = body["password"];
const token = body["token"];
const username = body.username;
const password = body.password;
const token = body.token;
function error(status: number, error: { id: string }) {
ctx.status = status;