Skip to content

Commit

Permalink
Google authentication for web UI
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislavsulc committed May 24, 2024
1 parent 7cf0411 commit 15afafb
Show file tree
Hide file tree
Showing 8 changed files with 254 additions and 51 deletions.
12 changes: 6 additions & 6 deletions mupifDB/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def read_root():
# Users
# --------------------------------------------------

@app.get("/users/{user_ip}", tags=["Users"])
def get_user(user_ip: str):
res = db.Users.find_one({'IP': user_ip})
if res:
return fix_id(res)
return None
# @app.get("/users/{user_ip}", tags=["Users"])
# def get_user(user_ip: str):
# res = db.Users.find_one({'IP': user_ip})
# if res:
# return fix_id(res)
# return None


# --------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions mupifDB/restApiControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ def getAuthToken():
# Users
# --------------------------------------------------

def getUserByIP(ip):
if api_type == 'granta':
return None
response = rGet(url=RESTserver + "users/" + str(ip))
return response.json()
# def getUserByIP(ip):
# if api_type == 'granta':
# return None
# response = rGet(url=RESTserver + "users/" + str(ip))
# return response.json()


# --------------------------------------------------
Expand Down
Loading

0 comments on commit 15afafb

Please sign in to comment.