Added ability to modify file metadata

This commit is contained in:
Isaac Abadi
2022-06-17 15:34:12 -04:00
parent 53a181e04d
commit 9cf8b87c6e
12 changed files with 264 additions and 77 deletions

View File

@@ -129,6 +129,27 @@ paths:
description: User is not authorized to view the file.
security:
- Auth query parameter: []
/api/updateFile:
post:
tags:
- files
summary: Updates file database object
description: Updates a file db object using its uid and a change object.
operationId: post-updateFile
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFileRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessObject'
security:
- Auth query parameter: []
/api/enableSharing:
post:
tags:
@@ -1509,6 +1530,8 @@ components:
properties:
success:
type: boolean
error:
type: string
FileType:
type: string
enum:
@@ -1738,6 +1761,18 @@ components:
type: boolean
file:
$ref: '#/components/schemas/DatabaseFile'
UpdateFileRequest:
required:
- uid
- change_obj
type: object
properties:
uid:
type: string
description: Video UID
change_obj:
type: object
description: Object with fields to update as keys and their new values
SharingToggle:
required:
- uid
@@ -2321,6 +2356,9 @@ components:
type: string
thumbnailURL:
type: string
description: Backup if thumbnailPath is not defined
thumbnailPath:
type: string
isAudio:
type: boolean
duration:
@@ -2332,6 +2370,7 @@ components:
type: string
size:
type: number
description: In bytes
path:
type: string
upload_date:
@@ -2340,6 +2379,12 @@ components:
type: string
sharingEnabled:
type: boolean
category:
$ref: '#/components/schemas/Category'
view_count:
type: number
local_view_count:
type: number
Playlist:
required:
- uids
@@ -2369,6 +2414,8 @@ components:
type: number
user_uid:
type: string
auto:
type: boolean
Download:
required:
- url