mirror of https://github.com/status-im/codimd.git
Better update of the authorship of anonymous users
Co-authored-by: Yukai Huang <yukaihuangtw@gmail.com> Signed-off-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch>
This commit is contained in:
parent
c9399f33d1
commit
dc37e5df63
|
@ -292,15 +292,15 @@ const updateNote = async (req, res) => {
|
|||
title: Note.parseNoteTitle(content),
|
||||
content: content,
|
||||
lastchangeAt: now,
|
||||
authorship: req.isAuthenticated() ? [
|
||||
authorship: [
|
||||
[
|
||||
req.user.id,
|
||||
req.isAuthenticated() ? req.user.id : null,
|
||||
0,
|
||||
content.length,
|
||||
now,
|
||||
now
|
||||
]
|
||||
] : []
|
||||
]
|
||||
})
|
||||
|
||||
if (!updated) {
|
||||
|
|
Loading…
Reference in New Issue