|
@@ -59,12 +59,12 @@ def register():
|
|
|
game_key = ''
|
|
|
if 'game_key' in request.json:
|
|
|
game_key = request.json['game_key'].strip().upper()
|
|
|
- if game_key != '' and game_key not in model.unused_keys():
|
|
|
+ if game_key != '' and not model.valid_key(game_key):
|
|
|
return bad_request('Game key is not valid.')
|
|
|
if model.register(username, hashed_password, game_key):
|
|
|
return {'message': "successfully registered user"}
|
|
|
else:
|
|
|
- return bad_request('registration not successful')
|
|
|
+ return bad_request('Registration not successful')
|
|
|
|
|
|
|
|
|
def activate_key():
|