From 09feefffcd7f0fedec5f5b7ad69fa9d62e4ccbda Mon Sep 17 00:00:00 2001 From: stringsplit <77242831+nbitzz@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:38:23 +0000 Subject: [PATCH] move up an endpoint --- src/server/index.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/server/index.ts b/src/server/index.ts index 9c53e3c..7989ae6 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -29,8 +29,17 @@ app.use("/static/style",express.static("out/style")) app.use("/static/js",express.static("out/client")) //app.use(bodyParser.text({limit:(config.maxDiscordFileSize*config.maxDiscordFiles)+1048576,type:["application/json","text/plain"]})) + app.use(cookieParser()) +app.get("/server",(req,res) => { + res.send(JSON.stringify({ + ...config, + version:pkg.version, + files:Object.keys(files.files).length + })) +}) + app .use("/auth",authRoutes.authRoutes) .use("/admin",adminRoutes.adminRoutes) @@ -201,13 +210,6 @@ app.get("/download/:fileId",(req,res) => { } }) -app.get("/server",(req,res) => { - res.send(JSON.stringify({ - ...config, - version:pkg.version, - files:Object.keys(files.files).length - })) -}) /* routes should be in this order: