Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
8a05f53c
Commit
8a05f53c
authored
Jun 07, 2023
by
jyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update notion response
parent
c9487caf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
.env.example
api/.env.example
+1
-0
data_source.py
api/controllers/console/datasets/data_source.py
+3
-3
oauth_data_source.py
api/libs/oauth_data_source.py
+1
-1
No files found.
api/.env.example
View file @
8a05f53c
...
...
@@ -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
...
...
api/controllers/console/datasets/data_source.py
View file @
8a05f53c
...
...
@@ -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
,
...
...
api/libs/oauth_data_source.py
View file @
8a05f53c
...
...
@@ -125,7 +125,7 @@ class NotionOAuth(OAuthDataSource):
results
=
response_json
[
'results'
]
for
result
in
results
:
page_id
=
result
[
'id'
]
page_name
=
result
[
'properties'
][
'
titl
e'
][
'title'
][
0
][
'plain_text'
]
page_name
=
result
[
'properties'
][
'
Nam
e'
][
'title'
][
0
][
'plain_text'
]
page_icon
=
result
[
'icon'
]
page
=
{
'page_id'
:
page_id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment