73d68c1db2
Ticket: 1386 The code was caching the first result and returning that. We would expand the cache for multiple files, that that also require checking if the file has changed, so just read the content every time -- I think the file is small enough?
9 lines
248 B
JavaScript
9 lines
248 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
async function getTempFile(ctx) {
|
|
const filename = ctx.params.filename;
|
|
return fs.readFileSync(path.join(__dirname, `/../dist/${filename}`), 'utf8');
|
|
}
|
|
|
|
module.exports = { getTempFile };
|