Add legacy skin and cape routes, improve error handling

Introduces legacy routes for Minecraft skins and capes to support older endpoints. Enhances error handling in sessionsRepository for missing skins/capes, adds getActiveSkin and getActiveCape to sessionsService, and improves error logging in server.js.
This commit is contained in:
2025-12-29 22:02:52 +01:00
parent 80fb6c6cd4
commit 9b36c85974
8 changed files with 82 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
const express = require("express")
const router = express.Router({ mergeParams: true })
const sessionsService = require("../../../services/sessionsService")
router.get("", async (req, res) => {
const cape = await sessionsService.getActiveSkin({ username: req.params.username.replace(".png", "") })
return res.redirect(`/textures${cape.data.url}`)
})
module.exports = router