mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
Add /me/notes route to MeController
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
5fcb220346
commit
e490ecba36
3 changed files with 15 additions and 2 deletions
|
@ -12,6 +12,8 @@ import {
|
|||
import { HistoryEntryUpdateDto } from '../../../history/history-entry-update.dto';
|
||||
import { HistoryEntryDto } from '../../../history/history-entry.dto';
|
||||
import { HistoryService } from '../../../history/history.service';
|
||||
import { NoteMetadataDto } from '../../../notes/note-metadata.dto';
|
||||
import { NotesService } from '../../../notes/notes.service';
|
||||
import { UserInfoDto } from '../../../users/user-info.dto';
|
||||
import { UsersService } from '../../../users/users.service';
|
||||
|
||||
|
@ -22,6 +24,7 @@ export class MeController {
|
|||
constructor(
|
||||
private usersService: UsersService,
|
||||
private historyService: HistoryService,
|
||||
private notesService: NotesService,
|
||||
) {}
|
||||
|
||||
@Get()
|
||||
|
@ -51,4 +54,9 @@ export class MeController {
|
|||
throw new NotFoundException(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
@Get('notes')
|
||||
getMyNotes(): NoteMetadataDto[] {
|
||||
return this.notesService.getUserNotes('someone');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue