mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 18:04:56 -04:00
feat: Add guest file uploads and add deletion for note owners
Signed-off-by: Yannick Bungers <git@innay.de> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
0f464dedfe
commit
485f7cd338
8 changed files with 244 additions and 68 deletions
|
@ -28,9 +28,9 @@ export class MediaUpload {
|
|||
note: Promise<Note | null>;
|
||||
|
||||
@ManyToOne((_) => User, (user) => user.mediaUploads, {
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
user: Promise<User>;
|
||||
user: Promise<User | null>;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
|
@ -65,7 +65,7 @@ export class MediaUpload {
|
|||
public static create(
|
||||
id: string,
|
||||
note: Note,
|
||||
user: User,
|
||||
user: User | null,
|
||||
extension: string,
|
||||
backendType: BackendType,
|
||||
fileUrl: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue