feat: creating FastAPI routes for working with cards

Added 3 routes:
- add_card (add a card via POST request with AddCardBody scheme)
- get_card (get a specific card by card_id)
- get_random_cards (get 10 random cards)
This commit is contained in:
IgorVolochay
2025-02-25 19:11:35 +03:00
parent 839476b9dc
commit 99867cef80
4 changed files with 64 additions and 1 deletions
+7 -1
View File
@@ -13,4 +13,10 @@ class AddUserBody(BaseModel):
first_name: str
last_name: str
photo_url: str
photo_url: str
class AddCardBody(BaseModel):
choice_A: str
choice_B: str
author_id: NonNegativeInt