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),
|
title: Note.parseNoteTitle(content),
|
||||||
content: content,
|
content: content,
|
||||||
lastchangeAt: now,
|
lastchangeAt: now,
|
||||||
authorship: req.isAuthenticated() ? [
|
authorship: [
|
||||||
[
|
[
|
||||||
req.user.id,
|
req.isAuthenticated() ? req.user.id : null,
|
||||||
0,
|
0,
|
||||||
content.length,
|
content.length,
|
||||||
now,
|
now,
|
||||||
now
|
now
|
||||||
]
|
]
|
||||||
] : []
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!updated) {
|
if (!updated) {
|
||||||
|
|
Loading…
Reference in New Issue