From 24c23c647433bcaa85ca3d04050dcc3780d04e98 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 14 Apr 2023 15:35:18 -0700 Subject: [PATCH] chore: formatting --- packages/backend/src/server/web/index.ts | 11 ++++++----- pnpm-lock.yaml | 9 --------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 52b49c2a4..028170cd7 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -98,11 +98,12 @@ app.use( // Favicon Router app.use(async (ctx, next) => { - if (ctx.path != '/favicon.ico') return next() - const meta = await fetchMeta(); - if (meta.iconUrl === "") ctx.body = readFileSync(`${_dirname}/../../../assets/favicon.ico`); - else ctx.redirect(meta.iconUrl) -}) + if (ctx.path != "/favicon.ico") return next(); + const meta = await fetchMeta(); + if (meta.iconUrl === "") + ctx.body = readFileSync(`${_dirname}/../../../assets/favicon.ico`); + else ctx.redirect(meta.iconUrl); +}); // Common request handler app.use(async (ctx, next) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 410801dde..7e62b9ef3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -227,9 +227,6 @@ importers: koa-bodyparser: specifier: 4.3.0 version: 4.3.0 - koa-favicon: - specifier: 2.1.0 - version: 2.1.0 koa-json-body: specifier: 5.3.0 version: 5.3.0 @@ -9837,12 +9834,6 @@ packages: koa-compose: 4.1.0 dev: false - /koa-favicon@2.1.0: - resolution: {integrity: sha512-LvukcooYjxKtnZq0RXdBup+JDhaHwLgnLlDHB/xvjwQEjbc4rbp/0WkmOzpOvaHujc+fIwPear0dpKX1V+dHVg==} - dependencies: - mz: 2.7.0 - dev: false - /koa-json-body@5.3.0: resolution: {integrity: sha512-M2P3zLOs2XiYCpJLGSTXOKij4u5vJ8pbAMXXarXQnwsx4DwDav9qn081tYI2RdZ79B159Pdk4bRfvwl/sazL8A==} engines: {node: '>= 4.0.0'}