chore: formatting

This commit is contained in:
ThatOneCalculator 2023-04-14 15:35:18 -07:00
parent 4f6cae7643
commit 1824b27e16
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 6 additions and 14 deletions

View File

@ -98,11 +98,12 @@ app.use(
// Favicon Router // Favicon Router
app.use(async (ctx, next) => { app.use(async (ctx, next) => {
if (ctx.path != '/favicon.ico') return next() if (ctx.path != "/favicon.ico") return next();
const meta = await fetchMeta(); const meta = await fetchMeta();
if (meta.iconUrl === "") ctx.body = readFileSync(`${_dirname}/../../../assets/favicon.ico`); if (meta.iconUrl === "")
else ctx.redirect(meta.iconUrl) ctx.body = readFileSync(`${_dirname}/../../../assets/favicon.ico`);
}) else ctx.redirect(meta.iconUrl);
});
// Common request handler // Common request handler
app.use(async (ctx, next) => { app.use(async (ctx, next) => {

View File

@ -227,9 +227,6 @@ importers:
koa-bodyparser: koa-bodyparser:
specifier: 4.3.0 specifier: 4.3.0
version: 4.3.0 version: 4.3.0
koa-favicon:
specifier: 2.1.0
version: 2.1.0
koa-json-body: koa-json-body:
specifier: 5.3.0 specifier: 5.3.0
version: 5.3.0 version: 5.3.0
@ -9837,12 +9834,6 @@ packages:
koa-compose: 4.1.0 koa-compose: 4.1.0
dev: false 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: /koa-json-body@5.3.0:
resolution: {integrity: sha512-M2P3zLOs2XiYCpJLGSTXOKij4u5vJ8pbAMXXarXQnwsx4DwDav9qn081tYI2RdZ79B159Pdk4bRfvwl/sazL8A==} resolution: {integrity: sha512-M2P3zLOs2XiYCpJLGSTXOKij4u5vJ8pbAMXXarXQnwsx4DwDav9qn081tYI2RdZ79B159Pdk4bRfvwl/sazL8A==}
engines: {node: '>= 4.0.0'} engines: {node: '>= 4.0.0'}