mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Add NotesService
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
643adb7f9f
commit
b05022945c
3 changed files with 60 additions and 0 deletions
39
src/notes/notes.service.ts
Normal file
39
src/notes/notes.service.ts
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { Injectable, Logger } from "@nestjs/common";
|
||||
import { NoteMetadataDto } from './note-metadata.dto';
|
||||
|
||||
@Injectable()
|
||||
export class NotesService {
|
||||
private readonly logger = new Logger(NotesService.name);
|
||||
|
||||
getUserNotes(username: string): NoteMetadataDto[] {
|
||||
this.logger.warn('Using hardcoded data!');
|
||||
return [
|
||||
{
|
||||
alias: null,
|
||||
createTime: new Date(),
|
||||
description: 'Very descriptive text.',
|
||||
editedBy: [],
|
||||
id: 'foobar-barfoo',
|
||||
permission: {
|
||||
owner: {
|
||||
displayName: 'foo',
|
||||
userName: 'fooUser',
|
||||
email: 'foo@example.com',
|
||||
photo: '',
|
||||
},
|
||||
sharedTo: [],
|
||||
},
|
||||
tags: [],
|
||||
title: 'Title!',
|
||||
updateTime: new Date(),
|
||||
updateUser: {
|
||||
displayName: 'foo',
|
||||
userName: 'fooUser',
|
||||
email: 'foo@example.com',
|
||||
photo: '',
|
||||
},
|
||||
viewCount: 42,
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue