From b5d6bf8a961dc82e262ab633a421150e05911d7f Mon Sep 17 00:00:00 2001 From: TheDogHusky Date: Tue, 23 Jul 2024 23:49:14 +0200 Subject: [PATCH] Fixed compatibility with frontend --- src/api/v1/random.ts | 2 +- src/structures/app.ts | 2 +- static/index.html | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/v1/random.ts b/src/api/v1/random.ts index 3a24efd..caf624d 100644 --- a/src/api/v1/random.ts +++ b/src/api/v1/random.ts @@ -30,7 +30,7 @@ router.get('/:type', (req, res) => { const image = files[Math.floor(Math.random() * files.length)]; return res.status(200).json({ - "url": getBaseURL(req) + "/images/" + type + "/" + image + "url": getBaseURL(req) + "/images/" + type + "s/" + image }); }); diff --git a/src/structures/app.ts b/src/structures/app.ts index 89ab884..fa1d069 100644 --- a/src/structures/app.ts +++ b/src/structures/app.ts @@ -42,7 +42,7 @@ export default class App { this.logger.info(`${req.method} @${req.originalUrl} - ${res.statusCode} (${utils.timingColor(ms)})`, "App"); }); const api = Api(this.logger); - this.app.use('/api', api); + this.app.use(api); }; public listen() { diff --git a/static/index.html b/static/index.html index 881172e..858e6e0 100644 --- a/static/index.html +++ b/static/index.html @@ -5,11 +5,11 @@ - + NekoNya-Storage - - - + + +