mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
History: Add HistoryEntry
With this the backend now can hold a history entry. Also included in this commit are some minor changes to tests and services so they can still work. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
2ee8ff4d91
commit
300b464efd
7 changed files with 72 additions and 2 deletions
|
@ -21,6 +21,7 @@ import {
|
|||
import { NoteDto } from './note.dto';
|
||||
import { Note } from './note.entity';
|
||||
import { Tag } from './tag.entity';
|
||||
import { HistoryEntry } from '../history/history-entry.entity';
|
||||
|
||||
@Injectable()
|
||||
export class NotesService {
|
||||
|
@ -46,6 +47,7 @@ export class NotesService {
|
|||
description: 'Very descriptive text.',
|
||||
userPermissions: [],
|
||||
groupPermissions: [],
|
||||
historyEntries: [],
|
||||
tags: [],
|
||||
revisions: Promise.resolve([]),
|
||||
authorColors: [],
|
||||
|
@ -69,6 +71,7 @@ export class NotesService {
|
|||
newNote.alias = alias;
|
||||
}
|
||||
if (owner) {
|
||||
newNote.historyEntries = [HistoryEntry.create(owner)];
|
||||
newNote.owner = owner;
|
||||
}
|
||||
return this.noteRepository.save(newNote);
|
||||
|
@ -153,12 +156,14 @@ export class NotesService {
|
|||
id: '1',
|
||||
identities: [],
|
||||
ownedNotes: [],
|
||||
historyEntries: [],
|
||||
updatedAt: new Date(),
|
||||
userName: 'Testy',
|
||||
},
|
||||
description: 'Very descriptive text.',
|
||||
userPermissions: [],
|
||||
groupPermissions: [],
|
||||
historyEntries: [],
|
||||
tags: [],
|
||||
revisions: Promise.resolve([]),
|
||||
authorColors: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue