add missing endpoints for creating items
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
This commit is contained in:
@@ -57,6 +57,22 @@ def file_to_model(model: MediaFileResponse, mediafile: MediaFile) -> MediaFile:
|
||||
return mediafile
|
||||
|
||||
|
||||
class MediaFileModel(BaseModel):
|
||||
"""
|
||||
Pydantic model to import MediaFile.
|
||||
"""
|
||||
id: str
|
||||
created_date: Optional[datetime]
|
||||
last_modified_date: Optional[datetime]
|
||||
version: int = 0
|
||||
title: Optional[str]
|
||||
file_name: Optional[str]
|
||||
cloud_link: Optional[str]
|
||||
url: Optional[str]
|
||||
review: bool = True
|
||||
should_download: bool = True
|
||||
|
||||
|
||||
class Link(BaseModel):
|
||||
"""
|
||||
PYdantic model for uploading url.
|
||||
|
||||
Reference in New Issue
Block a user