Fix route path and UUID formatting in session service
Changed route definitions in index.js from "" to "/" for correct routing. Updated sessionsService.js to add dashes to UUID before querying user data, ensuring proper UUID formatting.
This commit is contained in:
@@ -4,14 +4,14 @@ const utils = require("../modules/utils")
|
||||
const serverService = require("../services/serverService")
|
||||
|
||||
if (utils.isTrueFromDotEnv("SUPPORT_AUTHLIB_INJECTOR")) {
|
||||
router.get("", (req, res) => {
|
||||
router.get("/", (req, res) => {
|
||||
const hostname = req.hostname
|
||||
const metadata = serverService.getServerMetadata(hostname)
|
||||
res.header("X-Authlib-Injector-Date", new Date().toISOString())
|
||||
return res.status(200).json(metadata)
|
||||
})
|
||||
} else {
|
||||
router.get("", (req, res, next) => next())
|
||||
router.get("/", (req, res, next) => next())
|
||||
}
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user