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