Remove obsolete endpoints (#89)
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Remove endpoints api/login/token and api/login/profile --------- Co-authored-by: Thomas Peetz <thomas.peetz@cimt-ag.de> Reviewed-on: #89
This commit was merged in pull request #89.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.db.models.media import MediaArticle
|
||||
|
||||
class MediaArticleResponse(BaseModel):
|
||||
id: str
|
||||
created_date: datetime
|
||||
last_modified_date: datetime
|
||||
version: int
|
||||
review: bool = False
|
||||
title: Optional[str] = None
|
||||
url: Optional[str] = None
|
||||
|
||||
class AddLink(BaseModel):
|
||||
url: str
|
||||
|
||||
def to_response(video: MediaArticle) -> MediaArticleResponse:
|
||||
response: MediaArticleResponse = MediaArticleResponse(
|
||||
id=video.id,
|
||||
created_date=video.created_date,
|
||||
last_modified_date=video.last_modified_date,
|
||||
version=video.version,
|
||||
review=video.review,
|
||||
title=video.title,
|
||||
url=video.url,
|
||||
)
|
||||
return response
|
||||
Reference in New Issue
Block a user