diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-22 13:43:33 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-22 13:43:33 +0100 |
commit | c02dc3a493cf66f5c4a6ccd2a1155c3f8c2e37ef (patch) | |
tree | 5e408e28cdf81e67bc1f2894d6df403d8b20671e /api/auth | |
parent | 32aaaf92f2c06214abdc93e3cede07e067df6b88 (diff) |
added dynamic api routing
Diffstat (limited to 'api/auth')
-rw-r--r-- | api/auth/login.py | 2 | ||||
-rw-r--r-- | api/auth/login_token.py | 2 | ||||
-rw-r--r-- | api/auth/signup.py | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/api/auth/login.py b/api/auth/login.py index ae6ca96..9b99ba9 100644 --- a/api/auth/login.py +++ b/api/auth/login.py @@ -32,3 +32,5 @@ def index(): res.set_cookie("token", new_token["token"], expires = int(new_token["expirationDate"] / 1000)) return res + +dynamic_route = ["/auth", login] diff --git a/api/auth/login_token.py b/api/auth/login_token.py index 5812189..67b2a42 100644 --- a/api/auth/login_token.py +++ b/api/auth/login_token.py @@ -17,3 +17,5 @@ def index(): if not auth_token: return "", 400 return "", 200 if token_login(auth_token) else 401 + +dynamic_route = ["/auth", token] diff --git a/api/auth/signup.py b/api/auth/signup.py index 69c786f..a29bc59 100644 --- a/api/auth/signup.py +++ b/api/auth/signup.py @@ -41,3 +41,5 @@ def index(): res.set_cookie("token", new_token["token"], expires = int(new_token["expirationDate"] / 1000)) return res + +dynamic_route = ["/auth", signup] |