generated from azures04/Base-REST-API
Update download.js
This commit is contained in:
parent
453fed917d
commit
eed626c268
@ -3,7 +3,7 @@ const router = express.Router()
|
|||||||
const gameFilesService = require("../../../services/gameDataService")
|
const gameFilesService = require("../../../services/gameDataService")
|
||||||
|
|
||||||
router.get(/.*/, async (req, res) => {
|
router.get(/.*/, async (req, res) => {
|
||||||
const fileRequest = await gameFilesService.getFile(req.baseUrl.replace("/api/v2/download/", ""))
|
const fileRequest = await gameFilesService.getFile(req.originalUrl.replace("/api/v2/download/", ""))
|
||||||
return res.status(fileRequest.code).sendFile(fileRequest.path)
|
return res.status(fileRequest.code).sendFile(fileRequest.path)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user