move up an endpoint

This commit is contained in:
May 2023-08-03 12:38:23 +00:00
parent a4f3eac37b
commit 09feefffcd

View file

@ -29,8 +29,17 @@ app.use("/static/style",express.static("out/style"))
app.use("/static/js",express.static("out/client")) 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(bodyParser.text({limit:(config.maxDiscordFileSize*config.maxDiscordFiles)+1048576,type:["application/json","text/plain"]}))
app.use(cookieParser()) app.use(cookieParser())
app.get("/server",(req,res) => {
res.send(JSON.stringify({
...config,
version:pkg.version,
files:Object.keys(files.files).length
}))
})
app app
.use("/auth",authRoutes.authRoutes) .use("/auth",authRoutes.authRoutes)
.use("/admin",adminRoutes.adminRoutes) .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: routes should be in this order: