mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-08 09:30:43 +01:00
Add source for get_books endpoint
This commit is contained in:
@@ -6,6 +6,11 @@ from app.serializers.author import Author
|
||||
from app.serializers.orjson_config import ORJSONConfig
|
||||
|
||||
|
||||
class BookSource(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
|
||||
|
||||
class Book(BaseModel):
|
||||
id: int
|
||||
title: str
|
||||
@@ -19,6 +24,10 @@ class Book(BaseModel):
|
||||
pass
|
||||
|
||||
|
||||
class BookWithSource(Book):
|
||||
source: BookSource
|
||||
|
||||
|
||||
class CreateBook(BaseModel):
|
||||
source: int
|
||||
remote_id: int
|
||||
|
||||
Reference in New Issue
Block a user