Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
red-group-test
red-ci-cd
Commits
4a5d5d5f
Commit
4a5d5d5f
authored
Aug 06, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing
parent
6472b528
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
api/utils.py
api/utils.py
+1
-0
api/viewsets/applications.py
api/viewsets/applications.py
+6
-6
No files found.
api/utils.py
View file @
4a5d5d5f
...
...
@@ -114,6 +114,7 @@ class Helper:
base_url
=
endpoint
.
service
.
base_url
full_path
=
request
.
get_full_path
()
final_endpoint
=
f
"{base_url}{full_path}"
# print(final_endpoint)
if
endpoint
.
is_need_auth
is
True
:
# redirect to authenticator service
...
...
api/viewsets/applications.py
View file @
4a5d5d5f
...
...
@@ -101,17 +101,17 @@ class ApplicationViewSet(viewsets.ModelViewSet):
results
=
[]
for
item
in
serializer
.
data
:
# print(item['code'])
ids
=
item
[
'code'
]
#
ids = item['code']
# headers = {
# 'content-type': 'application/json',
# 'Authorization': request.META['HTTP_AUTHORIZATION']
# }
req
=
requests
.
get
(
f
'{AUTHENTICATOR_GROUP}/{ids}/'
)
groups
=
req
.
json
()[
'groups'
]
#
req = requests.get(f'{AUTHENTICATOR_GROUP}/{ids}/')
#
groups = req.json()['groups']
modules
=
req
.
json
()[
'modules'
]
item
[
'groups'
]
=
groups
item
[
'modules'
]
=
modules
#
modules = req.json()['modules']
#
item['groups'] = groups
#
item['modules'] = modules
results
.
append
(
item
)
message
=
{
...
...
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