jupiter0913 commited on
Commit
78967a7
·
1 Parent(s): 1a24c7c

feature(#194): update response data format with lower case...

Browse files
Brain/src/rising_plugin/gmail/email_plugin.py CHANGED
@@ -219,12 +219,12 @@ class EmailPlugin:
219
 
220
  messages.append(
221
  {
222
- "From": from_address,
223
- "To": to_address,
224
- "Date": date,
225
- "CC": cc,
226
- "Subject": subject,
227
- "Message Body": body,
228
  }
229
  )
230
 
@@ -232,12 +232,12 @@ class EmailPlugin:
232
  if not messages:
233
  messages.append(
234
  {
235
- "From": "",
236
- "To": "",
237
- "Date": "",
238
- "CC": "",
239
- "Subject": "",
240
- "Message Body": "There are no Emails",
241
  }
242
  )
243
  return json.dumps(messages)
 
219
 
220
  messages.append(
221
  {
222
+ "from": from_address,
223
+ "to": to_address,
224
+ "date": date,
225
+ "cc": cc,
226
+ "subject": subject,
227
+ "body": body,
228
  }
229
  )
230
 
 
232
  if not messages:
233
  messages.append(
234
  {
235
+ "from": "",
236
+ "to": "",
237
+ "date": "",
238
+ "cc": "",
239
+ "subject": "",
240
+ "body": "There are no Emails",
241
  }
242
  )
243
  return json.dumps(messages)
Brain/src/router/email_router.py CHANGED
@@ -30,12 +30,12 @@ def construct_blueprint_email_api() -> APIRouter:
30
 
31
  @generator.response(
32
  status_code=200, schema={"message": "message", "result": [{
33
- "From": "testfrom@test.com",
34
- "To": "test@gmail.com",
35
- "Date": "Tue, 04 Jul 2023 12:55:19 +0000",
36
- "CC": "",
37
- "Subject": "subject",
38
- "Message Body": "message"
39
  }]}
40
  )
41
 
 
30
 
31
  @generator.response(
32
  status_code=200, schema={"message": "message", "result": [{
33
+ "from": "testfrom@test.com",
34
+ "to": "test@gmail.com",
35
+ "date": "Tue, 04 Jul 2023 12:55:19 +0000",
36
+ "cc": "",
37
+ "subject": "subject",
38
+ "body": "message"
39
  }]}
40
  )
41