Add Telegram Auth and Dev mode

This commit is contained in:
IgorVolochay
2026-08-31 13:34:47 +03:00
parent 6c4ab4b2b4
commit 90ed19b2f6
6 changed files with 376 additions and 26 deletions
+7 -5
View File
@@ -2,13 +2,15 @@ import typing
from pydantic import BaseModel, NonNegativeInt
from typing import Optional
class BaseResponse(BaseModel):
result: typing.Any
error: bool = False
class AddUserBody(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
username: str
first_name: str
@@ -19,20 +21,20 @@ class AddCardBody(BaseModel):
choice_A: str
choice_B: str
author_id: NonNegativeInt
author_id: Optional[NonNegativeInt] = None
class SelectChoice(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
choice: typing.Literal["A", "B"]
class ReactionCard(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
class AddCommentBody(BaseModel):
author_id: NonNegativeInt
author_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
comment_text: str