mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
Add GET /me/media
Returns all media files uploaded by the authenticated user. Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
7a7b3d3a50
commit
f47d85b301
7 changed files with 174 additions and 10 deletions
37
src/media/media-upload.dto.ts
Normal file
37
src/media/media-upload.dto.ts
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { IsDate, IsString } from 'class-validator';
|
||||
|
||||
export class MediaUploadDto {
|
||||
/**
|
||||
* The link to the media file.
|
||||
* @example "https://example.com/uploads/testfile123.jpg"
|
||||
*/
|
||||
@IsString()
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* The noteId of the note to which the uploaded file is linked to.
|
||||
* @example "noteId" TODO how looks a note id?
|
||||
*/
|
||||
@IsString()
|
||||
noteId: string;
|
||||
|
||||
/**
|
||||
* The date when the upload objects was created.
|
||||
* @example "2020-12-01 12:23:34"
|
||||
*/
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
|
||||
/**
|
||||
* The userName of the user which uploaded the media file.
|
||||
* @example "testuser5"
|
||||
*/
|
||||
@IsString()
|
||||
userName: string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue