LentiaServices/routes/api/v2/download.js
azures04 2e23d417af Refactor API routes and add status endpoint
Moved download and gamefiles routes to api/v2 directory and updated service imports. Added a new api/v2/status endpoint to report maintenance status. Introduced api/v1/file route to return 410 error for deprecated launcher support.
2026-01-25 21:47:49 +01:00

10 lines
365 B
JavaScript

const express = require("express")
const router = express.Router()
const gameFilesService = require("../../../services/gameDataService")
router.get(/.*/, async (req, res) => {
const fileRequest = await gameFilesService.getFile(req.baseUrl.replace("/download/", ""))
return res.status(fileRequest.code).sendFile(fileRequest.path)
})
module.exports = router