LentiaServices/routes/api/v2/download.js
azures04 453fed917d Update download route and related config paths
Changed BASE_POINT in .env.example and the download route in download.js to use '/api/v2/download/' instead of '/download/'. Updated .gitignore to exclude '/data/game' directory.
2026-01-25 22:12:42 +01:00

10 lines
372 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("/api/v2/download/", ""))
return res.status(fileRequest.code).sendFile(fileRequest.path)
})
module.exports = router