Add Telegram Auth and Dev mode
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user