Mbonea commited on
Commit
2046386
·
1 Parent(s): db9d9b2

schema errors

Browse files
App/Messages/MessagesRoute.py CHANGED
@@ -26,7 +26,7 @@ async def receive_message(request: Request):
26
  new_message = await Message.create(
27
  device_id=message_data.deviceId,
28
  event=message_data.event,
29
- message_id=message_data.messageId,
30
  webhook_id=message_data.webhookId,
31
  message_content=text,
32
  phone_number=message_data.payload.phoneNumber,
 
26
  new_message = await Message.create(
27
  device_id=message_data.deviceId,
28
  event=message_data.event,
29
+ message_id=message_data.id,
30
  webhook_id=message_data.webhookId,
31
  message_content=text,
32
  phone_number=message_data.payload.phoneNumber,
App/Messages/Schema.py CHANGED
@@ -14,7 +14,7 @@ class PayloadSchema(BaseModel):
14
  class MessageCreate(BaseModel):
15
  deviceId: Optional[str]
16
  event: Optional[str]
17
- messageId: Optional[str]
18
  payload: PayloadSchema
19
  webhookId: Optional[str]
20
 
 
14
  class MessageCreate(BaseModel):
15
  deviceId: Optional[str]
16
  event: Optional[str]
17
+ id: Optional[str]
18
  payload: PayloadSchema
19
  webhookId: Optional[str]
20