aboutsummaryrefslogtreecommitdiffstats
path: root/routes/auth.py
diff options
context:
space:
mode:
authorFulgen301 <tokmajigeorge@gmail.com>2019-07-26 13:46:34 +0200
committerFulgen301 <tokmajigeorge@gmail.com>2019-07-26 13:46:34 +0200
commitc1f5360a8b06364dd5ae6e916a5cbccf1966d380 (patch)
tree179f9e2c048148df81da3b9cf52615f477921eaf /routes/auth.py
parent8213c244eaca9a65a51ccb8422b3adb45485ef43 (diff)
downloadparry-c1f5360a8b06364dd5ae6e916a5cbccf1966d380.tar.gz
parry-c1f5360a8b06364dd5ae6e916a5cbccf1966d380.zip
Finally fix CORS
Diffstat (limited to 'routes/auth.py')
-rw-r--r--routes/auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/auth.py b/routes/auth.py
index cdcacf1..d6b6ffd 100644
--- a/routes/auth.py
+++ b/routes/auth.py
@@ -21,16 +21,16 @@ def post_auth_new():
username = request_data()["username"]
password = request_data()["password"]
except KeyError as e:
- raise ParryHTTPResponse("Username or password missing", 400)
+ raise HTTPResponse("Username or password missing", 400)
hash = calculateUserHash(username, password).hexdigest()
try:
session.query(User).filter(User.name == username or User.hash == hash).one()
- raise ParryHTTPResponse("User already exists", status=409)
+ raise HTTPResponse("User already exists", status=409)
except db.orm.exc.NoResultFound:
session.add(User(name=username, hash=hash))
session.commit()
- return ParryHTTPResponse(status=303, headers={"Location" : "/api/auth"})
+ return HTTPResponse(status=303, headers={"Location" : "/api/auth"})
@get("/api/auth")
@jwt_auth_required