diff --git a/.env.example b/.env.example index ddfc9c3..b5157db 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ WEB_PORT=8535 IS_PROD=FALSE -BASE_POINT=http://localhost:8535/download/ \ No newline at end of file +BASE_POINT=http://localhost:8535/api/v2/download/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7500a08..9b9cebb 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,5 @@ dist .pnp.* #logs -logs \ No newline at end of file +logs +/data/game diff --git a/routes/api/v2/download.js b/routes/api/v2/download.js index d402830..d56b63a 100644 --- a/routes/api/v2/download.js +++ b/routes/api/v2/download.js @@ -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) })