Update NoteDraftService.ts
This commit is contained in:
parent
7c12fb87f6
commit
8783334d42
|
@ -98,7 +98,7 @@ export class NoteDraftService {
|
||||||
|
|
||||||
appliedDraft.id = this.idService.gen();
|
appliedDraft.id = this.idService.gen();
|
||||||
appliedDraft.userId = me.id;
|
appliedDraft.userId = me.id;
|
||||||
const draft = this.noteDraftsRepository.save(appliedDraft);
|
const draft = this.noteDraftsRepository.insertOne(appliedDraft);
|
||||||
|
|
||||||
return draft;
|
return draft;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,12 @@ export class NoteDraftService {
|
||||||
|
|
||||||
const appliedDraft = await this.checkAndSetDraftNoteOptions(me, draft, data);
|
const appliedDraft = await this.checkAndSetDraftNoteOptions(me, draft, data);
|
||||||
|
|
||||||
return await this.noteDraftsRepository.save(appliedDraft);
|
await this.noteDraftsRepository.update(draftId, appliedDraft);
|
||||||
|
|
||||||
|
return {
|
||||||
|
...draft,
|
||||||
|
...appliedDraft,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
Loading…
Reference in New Issue