fix: change docs upload template and handler
This commit is contained in:
@@ -1,3 +1,2 @@
|
|||||||
#docs
|
#docs
|
||||||
Клиент с ID: {{id_client}}
|
Клиент юр. лицо. отправил документы на проверку
|
||||||
Отправил документы на проверку
|
|
||||||
@@ -22,8 +22,8 @@ class Metadata(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class Payload(BaseModel):
|
class Payload(BaseModel):
|
||||||
id_client: str
|
id_client: Optional[str] = None
|
||||||
usdt_amount: Optional[Decimal] = None
|
rub_amount: Optional[Decimal] = None
|
||||||
|
|
||||||
|
|
||||||
class NotifyCreated(BaseModel):
|
class NotifyCreated(BaseModel):
|
||||||
@@ -47,7 +47,7 @@ async def consume_notify(
|
|||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"received event={msg_body.event} "
|
f"received event={msg_body.event} "
|
||||||
f"id_client={msg_body.payload.id_client} "
|
f"id_client={msg_body.payload.id_client if msg_body.payload.id_client else 'New Client'} "
|
||||||
f"trace_id={trace_id}"
|
f"trace_id={trace_id}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -61,7 +61,6 @@ async def consume_notify(
|
|||||||
elif msg_body.event == 'docs_upload':
|
elif msg_body.event == 'docs_upload':
|
||||||
text = renderer.render(
|
text = renderer.render(
|
||||||
'docs_notify.txt',
|
'docs_notify.txt',
|
||||||
id_client=msg_body.payload.id_client,
|
|
||||||
trace_id=trace_id
|
trace_id=trace_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user