mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-07-08 21:13:56 -05:00
fixed task sheets
This commit is contained in:
parent
90a4ee9c74
commit
911f4c69a7
|
|
@ -7,9 +7,9 @@ const subdomain = require('express-subdomain');
|
|||
const npts = express.Router();
|
||||
|
||||
// Setup routes
|
||||
npts.get('/p01/tasksheet/1/:id/:fileName', (request, response) => {
|
||||
npts.get('/p01/tasksheet/1/:id/:hash/:fileName', (request, response) => {
|
||||
const { id, fileName } = request.params;
|
||||
const tasksheetPath = path.normalize(`${__dirname}/../../cdn/tasksheet/${id}/${fileName}`);
|
||||
const tasksheetPath = path.normalize(`${__dirname}/../../cdn/tasksheet/${id}/${hash}/${fileName}`);
|
||||
|
||||
if (fs.existsSync(tasksheetPath)) {
|
||||
response.sendFile(tasksheetPath);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user