generated from azures04/Base-REST-API
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.
This commit is contained in:
parent
7aa2b71aea
commit
453fed917d
@ -1,3 +1,3 @@
|
||||
WEB_PORT=8535
|
||||
IS_PROD=FALSE
|
||||
BASE_POINT=http://localhost:8535/download/
|
||||
BASE_POINT=http://localhost:8535/api/v2/download/
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -131,4 +131,5 @@ dist
|
||||
.pnp.*
|
||||
|
||||
#logs
|
||||
logs
|
||||
logs
|
||||
/data/game
|
||||
|
||||
@ -3,7 +3,7 @@ const router = express.Router()
|
||||
const gameFilesService = require("../../../services/gameDataService")
|
||||
|
||||
router.get(/.*/, async (req, res) => {
|
||||
const fileRequest = await gameFilesService.getFile(req.baseUrl.replace("/download/", ""))
|
||||
const fileRequest = await gameFilesService.getFile(req.baseUrl.replace("/api/v2/download/", ""))
|
||||
return res.status(fileRequest.code).sendFile(fileRequest.path)
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user