mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-04 00:48:51 -04:00
HistoryService: Refactor updateHistoryEntry
The function now expects a `Note` object instead of a noteId to make it more consistent with `updateHistoryEntryTimestamp`. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
3396d3e47d
commit
839877dbc5
4 changed files with 12 additions and 8 deletions
|
@ -31,7 +31,9 @@ import { HistoryService } from '../../../history/history.service';
|
|||
import { ConsoleLoggerService } from '../../../logger/console-logger.service';
|
||||
import { MediaUploadDto } from '../../../media/media-upload.dto';
|
||||
import { MediaService } from '../../../media/media.service';
|
||||
import { GetNotePipe } from '../../../notes/get-note.pipe';
|
||||
import { NoteMetadataDto } from '../../../notes/note-metadata.dto';
|
||||
import { Note } from '../../../notes/note.entity';
|
||||
import { NotesService } from '../../../notes/notes.service';
|
||||
import { UserInfoDto } from '../../../users/user-info.dto';
|
||||
import { User } from '../../../users/user.entity';
|
||||
|
@ -119,7 +121,7 @@ export class MeController {
|
|||
@ApiNotFoundResponse({ description: notFoundDescription })
|
||||
async updateHistoryEntry(
|
||||
@RequestUser() user: User,
|
||||
@Param('note') note: string,
|
||||
@Param('note', GetNotePipe) note: Note,
|
||||
@Body() entryUpdateDto: HistoryEntryUpdateDto,
|
||||
): Promise<HistoryEntryDto> {
|
||||
// ToDo: Check if user is allowed to pin this history entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue