mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-26 23:03:34 +00:00
Inline renderPublishSlide
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
3c39d07723
commit
b5ccceff59
1 changed files with 4 additions and 8 deletions
|
@ -32,7 +32,10 @@ exports.showPublishSlide = function (req, res, next) {
|
|||
return errors.errorNotFound(res)
|
||||
}
|
||||
noteUtil.getPublishData(req, res, note, (data) => {
|
||||
return renderPublishSlide(data, res)
|
||||
res.set({
|
||||
'Cache-Control': 'private' // only cache by client
|
||||
})
|
||||
return res.render('slide.ejs', data)
|
||||
})
|
||||
}).catch(function (err) {
|
||||
logger.error(err)
|
||||
|
@ -40,10 +43,3 @@ exports.showPublishSlide = function (req, res, next) {
|
|||
})
|
||||
}, include)
|
||||
}
|
||||
|
||||
function renderPublishSlide (data, res) {
|
||||
res.set({
|
||||
'Cache-Control': 'private' // only cache by client
|
||||
})
|
||||
res.render('slide.ejs', data)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue