Skip to content
Snippets Groups Projects
Commit 737cb243 authored by torrespel's avatar torrespel
Browse files

fix logs

parent e281f671
Branches
Tags
2 merge requests!43Staging to Main for Release 1,!35Register Logs
Pipeline #6853 passed with stages
in 3 minutes and 52 seconds
......@@ -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
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