mirror of https://github.com/status-im/codimd.git
Don't generate jwt token for guest
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
parent
c8462c72b3
commit
6bffadaf38
|
@ -83,7 +83,7 @@ function actionPDF (req, res, note) {
|
|||
const noteId = req.params.noteId
|
||||
|
||||
if (req.method === 'POST') {
|
||||
const token = jwt.sign({ userId: req.user.id.toString() }, config.codimdSignKey, { expiresIn: 5 * 60 })
|
||||
const token = req.user && jwt.sign({ userId: req.user.id.toString() }, config.codimdSignKey, { expiresIn: 5 * 60 })
|
||||
|
||||
const noteURL = `${config.serverURL}/${noteId}/pdf`
|
||||
|
||||
|
|
Loading…
Reference in New Issue