Commit 8a05f53c authored by jyong's avatar jyong

update notion response

parent c9487caf
......@@ -22,6 +22,7 @@ CELERY_BROKER_URL=redis://:difyai123456@localhost:6379/1
# redis configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_USERNAME: ''
REDIS_PASSWORD=difyai123456
REDIS_DB=0
......
......@@ -31,14 +31,14 @@ class DataSourceApi(Resource):
integrate_page_fields = {
'page_name': fields.String,
'page_id': fields.String,
'page_icon': fields.String,
'total': fields.Integer
'page_icon': fields.String
}
integrate_workspace_fields = {
'workspace_name': fields.String,
'workspace_id': fields.String,
'workspace_icon': fields.String,
'pages': fields.List(fields.Nested(integrate_page_fields))
'pages': fields.List(fields.Nested(integrate_page_fields)),
'total': fields.Integer
}
integrate_fields = {
'id': fields.String,
......
......@@ -125,7 +125,7 @@ class NotionOAuth(OAuthDataSource):
results = response_json['results']
for result in results:
page_id = result['id']
page_name = result['properties']['title']['title'][0]['plain_text']
page_name = result['properties']['Name']['title'][0]['plain_text']
page_icon = result['icon']
page = {
'page_id': page_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment