Handle JSON request to /p/create
The Pillar Python SDK posts JSON, so we should handle that too.
This commit is contained in:
parent
8bb98aa280
commit
042b744b6e
@ -225,6 +225,9 @@ def _create_new_project(project_name, user_id, overrides):
|
||||
def create_project(overrides=None):
|
||||
"""Creates a new project."""
|
||||
|
||||
if request.mimetype == 'application/json':
|
||||
project_name = request.json['name']
|
||||
else:
|
||||
project_name = request.form['project_name']
|
||||
user_id = g.current_user['user_id']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user