Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
capif
Manage
Activity
Members
Labels
Plan
Issues
25
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
OCF
capif
Commits
737cb243
Commit
737cb243
authored
6 months ago
by
torrespel
Browse files
Options
Downloads
Patches
Plain Diff
fix logs
parent
e281f671
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!43
Staging to Main for Release 1
,
!35
Register Logs
Pipeline
#6853
passed with stages
in 3 minutes and 52 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/register/register_service/app.py
+4
-1
4 additions, 1 deletion
services/register/register_service/app.py
with
4 additions
and
1 deletion
services/register/register_service/app.py
+
4
−
1
View file @
737cb243
...
...
@@ -7,7 +7,7 @@ import requests
import
json
from
config
import
Config
from
db.db
import
MongoDatabse
import
logging
app
=
Flask
(
__name__
)
...
...
@@ -77,6 +77,7 @@ key_data = json.loads(response.text)["data"]["data"]["key"]
# Create an Admin in the Admin Collection
client
=
MongoDatabse
()
if
not
client
.
get_col_by_name
(
client
.
capif_admins
).
find_one
({
"
admin_name
"
:
config
[
"
register
"
][
"
admin_users
"
][
"
admin_user
"
],
"
admin_pass
"
:
config
[
"
register
"
][
"
admin_users
"
][
"
admin_pass
"
]}):
print
(
f
'
Inserting Initial Admin admin_name:
{
config
[
"
register
"
][
"
admin_users
"
][
"
admin_user
"
]
}
, admin_pass:
{
config
[
"
register
"
][
"
admin_users
"
][
"
admin_pass
"
]
}
'
)
client
.
get_col_by_name
(
client
.
capif_admins
).
insert_one
({
"
admin_name
"
:
config
[
"
register
"
][
"
admin_users
"
][
"
admin_user
"
],
"
admin_pass
"
:
config
[
"
register
"
][
"
admin_users
"
][
"
admin_pass
"
]})
...
...
@@ -84,4 +85,6 @@ app.config['JWT_ALGORITHM'] = 'RS256'
app
.
config
[
'
JWT_PRIVATE_KEY
'
]
=
key_data
app
.
config
[
'
REGISTRE_SECRET_KEY
'
]
=
config
[
"
register
"
][
"
register_uuid
"
]
app
.
logger
.
setLevel
(
logging
.
DEBUG
)
app
.
register_blueprint
(
register_routes
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment