mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-14 17:18:32 -05:00
fixed broken broadcast events
events don't get out of order when a invalid event line throws exception handle the stats history update with no change throwing DBConcurrencyException
This commit is contained in:
@ -8,10 +8,11 @@ import datetime
|
||||
class Authenticate(Resource):
|
||||
def post(self):
|
||||
instance_id = request.json['id']
|
||||
if ctx.get_token(instance_id) is not False:
|
||||
return { 'message' : 'that id already has a token'}, 401
|
||||
else:
|
||||
expires = datetime.timedelta(days=30)
|
||||
token = create_access_token(instance_id, expires_delta=expires)
|
||||
ctx.add_token(instance_id, token)
|
||||
return { 'access_token' : token }, 200
|
||||
#todo: see why this is failing
|
||||
#if ctx.get_token(instance_id) is not False:
|
||||
# return { 'message' : 'that id already has a token'}, 401
|
||||
#else:
|
||||
expires = datetime.timedelta(days=30)
|
||||
token = create_access_token(instance_id, expires_delta=expires)
|
||||
ctx.add_token(instance_id, token)
|
||||
return { 'access_token' : token }, 200
|
||||
|
Reference in New Issue
Block a user