feat(etapi): also save note revision via etapi if needed too

asdf
This commit is contained in:
perf3ct 2025-08-10 04:53:27 +00:00
parent 78bb0ab016
commit 2950c5eaa4
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -92,6 +92,7 @@ function register(router: Router) {
throw new eu.EtapiError(400, "NOTE_IS_PROTECTED", `Note '${req.params.noteId}' is protected and cannot be modified through ETAPI.`);
}
noteService.saveRevisionIfNeeded(note);
eu.validateAndPatch(note, req.body, ALLOWED_PROPERTIES_FOR_PATCH);
note.save();
@ -136,6 +137,7 @@ function register(router: Router) {
throw new eu.EtapiError(400, "NOTE_IS_PROTECTED", `Note '${req.params.noteId}' is protected and cannot be modified through ETAPI.`);
}
noteService.saveRevisionIfNeeded(note);
note.setContent(req.body);
noteService.asyncPostProcessContent(note, req.body);