mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Added POST for organisation rest
This commit is contained in:
@@ -27,8 +27,8 @@ def get_organisation_by_id(org_id):
|
||||
@organisation_blueprint.route('', methods=['POST'])
|
||||
def post_organisation():
|
||||
data = request.get_json()
|
||||
if not data.get('name', None):
|
||||
errors = {'name': ['Missing data for required field.']}
|
||||
if not data.get('logo', None):
|
||||
errors = {'logo': ['Missing data for required field.']}
|
||||
raise InvalidRequest(errors, status_code=400)
|
||||
|
||||
# validate json with marshmallow
|
||||
|
||||
Reference in New Issue
Block a user