Add webhook feed method to Dispatcher

This commit is contained in:
Alex Root Junior 2020-02-22 00:59:10 +02:00
parent a41bccddf9
commit 3f5c51e805
4 changed files with 239 additions and 132 deletions

View file

@ -24,6 +24,12 @@ class Request(BaseModel):
class Config(BaseConfig):
arbitrary_types_allowed = True
def render_webhook_request(self):
return {
"method": self.method,
**{key: value for key, value in self.data.items() if value is not None},
}
class Response(ResponseParameters, GenericModel, Generic[T]):
ok: bool