mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
Add NoteModule
This contains the module, a model which was adapted from the old code and two DTOs. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b528d7f76e
commit
56d5a2e1b1
6 changed files with 196 additions and 1 deletions
17
src/notes/note-permissions.dto.ts
Normal file
17
src/notes/note-permissions.dto.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { IsArray, IsBoolean, ValidateNested } from 'class-validator';
|
||||
import { UserInfoDto } from '../users/user-info.dto';
|
||||
|
||||
export class NotePermissionEntryDto {
|
||||
@ValidateNested()
|
||||
user: UserInfoDto;
|
||||
@IsBoolean()
|
||||
canEdit: boolean;
|
||||
}
|
||||
|
||||
export class NotePermissionsDto {
|
||||
@ValidateNested()
|
||||
owner: UserInfoDto;
|
||||
@ValidateNested()
|
||||
@IsArray()
|
||||
sharedTo: NotePermissionEntryDto[];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue