mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -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'])
|
@organisation_blueprint.route('', methods=['POST'])
|
||||||
def post_organisation():
|
def post_organisation():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
if not data.get('name', None):
|
if not data.get('logo', None):
|
||||||
errors = {'name': ['Missing data for required field.']}
|
errors = {'logo': ['Missing data for required field.']}
|
||||||
raise InvalidRequest(errors, status_code=400)
|
raise InvalidRequest(errors, status_code=400)
|
||||||
|
|
||||||
# validate json with marshmallow
|
# validate json with marshmallow
|
||||||
|
|||||||
Reference in New Issue
Block a user