mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-16 16:52:39 +00:00
Fixes from Linter
This commit is contained in:
@@ -100,7 +100,7 @@ const shareFunction = function(req, res, type) {
|
|||||||
const setSourceHeaders = function (res, title, type) {
|
const setSourceHeaders = function (res, title, type) {
|
||||||
res.status(200);
|
res.status(200);
|
||||||
if(type == 'download') {
|
if(type == 'download') {
|
||||||
let fileName = sanitizeFilename(title).replaceAll(' ', '-');
|
const fileName = sanitizeFilename(title).replaceAll(' ', '-');
|
||||||
|
|
||||||
res.set({
|
res.set({
|
||||||
'Cache-Control' : 'no-cache',
|
'Cache-Control' : 'no-cache',
|
||||||
@@ -108,7 +108,7 @@ const setSourceHeaders = function (res, title, type) {
|
|||||||
'Content-Disposition' : `attachment; filename="HomeBrewery-${fileName}.txt"`
|
'Content-Disposition' : `attachment; filename="HomeBrewery-${fileName}.txt"`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const getSourceText = function (brewText, type) {
|
const getSourceText = function (brewText, type) {
|
||||||
if(type == 'source') {
|
if(type == 'source') {
|
||||||
@@ -119,7 +119,7 @@ const getSourceText = function (brewText, type) {
|
|||||||
console.log('Unhandled source share type');
|
console.log('Unhandled source share type');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//Source page
|
//Source page
|
||||||
app.get('/source/:id', (req, res)=>{
|
app.get('/source/:id', (req, res)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user