PrivateAPI: Add pinStatus to HistoryEntryImportDto

As the DTO is only for importing an existing history the pinStatus of those entries should also be posted.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-10 23:31:18 +02:00 committed by David Mehren
parent 1154894876
commit eeaa74b385
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
5 changed files with 70 additions and 8 deletions

View file

@ -65,7 +65,11 @@ export class HistoryController {
const note = await this.noteService.getNoteByIdOrAlias(
historyEntry.note,
);
await this.historyService.createOrUpdateHistoryEntry(note, user);
await this.historyService.createOrUpdateHistoryEntry(
note,
user,
historyEntry.pinStatus,
);
}
} catch (e) {
if (e instanceof NotInDBError) {