fix: relation error

This commit is contained in:
Mar0xy 2023-10-06 18:22:41 +02:00
parent 16130fae60
commit d3b9e82192
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -365,8 +365,8 @@ export class NoteEditService implements OnApplicationShutdown {
}); });
const note = new MiNote({ const note = new MiNote({
id: this.idService.genId(oldnote.createdAt!), id: this.idService.genId(new Date(oldnote.createdAt!)),
//createdAt: new Date(oldnote.createdAt!), createdAt: new Date(oldnote.createdAt!),
updatedAt: data.updatedAt ? data.updatedAt : new Date(), updatedAt: data.updatedAt ? data.updatedAt : new Date(),
fileIds: data.files ? data.files.map(file => file.id) : [], fileIds: data.files ? data.files.map(file => file.id) : [],
replyId: data.reply ? data.reply.id : null, replyId: data.reply ? data.reply.id : null,