Skip to content

Commit 2950c5e

Browse files
committed
feat(etapi): also save note revision via etapi if needed too
asdf
1 parent 78bb0ab commit 2950c5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/server/src/etapi/notes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ function register(router: Router) {
9292
throw new eu.EtapiError(400, "NOTE_IS_PROTECTED", `Note '${req.params.noteId}' is protected and cannot be modified through ETAPI.`);
9393
}
9494

95+
noteService.saveRevisionIfNeeded(note);
9596
eu.validateAndPatch(note, req.body, ALLOWED_PROPERTIES_FOR_PATCH);
9697
note.save();
9798

@@ -136,6 +137,7 @@ function register(router: Router) {
136137
throw new eu.EtapiError(400, "NOTE_IS_PROTECTED", `Note '${req.params.noteId}' is protected and cannot be modified through ETAPI.`);
137138
}
138139

140+
noteService.saveRevisionIfNeeded(note);
139141
note.setContent(req.body);
140142

141143
noteService.asyncPostProcessContent(note, req.body);

0 commit comments

Comments
 (0)