Add webhook after update

This commit is contained in:
2021-12-11 18:18:41 +03:00
parent 4588d8e4c3
commit 64992c9c2a
4 changed files with 35 additions and 1 deletions

View File

@@ -1,4 +1,11 @@
from pydantic import BaseSettings
from typing import Optional, Union, Literal
from pydantic import BaseModel, BaseSettings
class WebhookConfig(BaseModel):
method: Union[Literal['get'], Literal['post']]
url: str
headers: dict[str, str]
class EnvConfig(BaseSettings):
@@ -18,5 +25,7 @@ class EnvConfig(BaseSettings):
FL_BASE_URL: str
WEBHOOKS: Optional[list[WebhookConfig]]
env_config = EnvConfig()