Lots of small NPE and other exception fixes
This commit is contained in:
parent
511ee12a58
commit
e8ad01cb41
5 changed files with 22 additions and 4 deletions
|
@ -66,6 +66,9 @@ def generate_headers(role='read'):
|
|||
@index.route('/users/', methods=['POST'])
|
||||
def create_user():
|
||||
user_data = request.get_json()
|
||||
if not 'username' in user_data:
|
||||
abort(400, 'Missing username')
|
||||
|
||||
username = user_data['username']
|
||||
password = user_data.get('password', '')
|
||||
|
||||
|
|
Reference in a new issue