Skip to content

Commit d9bd0bf

Browse files
committed
apply suggestions from code review
1 parent 9a32b95 commit d9bd0bf

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
77
### Added
88

99
- Schema templating for insert queries using query params PR #131
10-
- Add support for OIDC login flow PR #130
10+
- Add support for OIDC login flow PR #130 (#125)
1111

1212
## [0.5.0] - 2022-09-21
1313

pharus/interface.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def _attempt_login(databaseAddress: str, username: str, password: str):
3030
dj.config["database.host"] = databaseAddress
3131
dj.config["database.user"] = username
3232
dj.config["database.password"] = password
33-
print(dj.config, flush=True)
3433
# Attempt to connect return true if successful, false is failed
3534
dj.conn(reset=True)
3635

pharus/server.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import Callable
66
from functools import wraps
77
from typing import Union
8-
import traceback
98

109
# Crypto libaries
1110
from cryptography.hazmat.primitives import serialization as crypto_serialization
@@ -84,7 +83,7 @@ def wrapper(**kwargs):
8483
)
8584
return function(connect_creds, **kwargs)
8685
except Exception as e:
87-
return traceback.format_exc(), 401
86+
return str(e), 401
8887

8988
wrapper.__name__ = function.__name__
9089
return wrapper
@@ -248,7 +247,7 @@ def login() -> dict:
248247
_DJConnector._attempt_login(**connect_creds)
249248
return dict(jwt=encoded_jwt)
250249
except Exception as e:
251-
return traceback.format_exc(), 500
250+
return str(e), 500
252251

253252

254253
@app.route(f"{environ.get('PHARUS_PREFIX', '')}/schema", methods=["GET"])

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ datajoint_connection_hub
66
pyyaml
77
envyaml
88
otumat>=0.3.1
9-
numpy
9+
numpy
10+
requests

0 commit comments

Comments
 (0)