mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:45:41 -04:00
ugh
This commit is contained in:
@@ -90,17 +90,11 @@ def get_organization_by_domain():
|
|||||||
@organization_blueprint.route("", methods=["POST"])
|
@organization_blueprint.route("", methods=["POST"])
|
||||||
def create_organization():
|
def create_organization():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
try:
|
validate(data, post_create_organization_schema)
|
||||||
validate(data, post_create_organization_schema)
|
organization = Organization(**data)
|
||||||
organization = Organization(**data)
|
dao_create_organization(organization)
|
||||||
dao_create_organization(organization)
|
|
||||||
return jsonify(organization.serialize()), 201
|
return jsonify(organization.serialize()), 201
|
||||||
except Exception:
|
|
||||||
current_app.logger.exception("Validation error creating organization")
|
|
||||||
return (
|
|
||||||
jsonify(result="error", message="Validation error creating organization"),
|
|
||||||
400,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@organization_blueprint.route("/<uuid:organization_id>", methods=["POST"])
|
@organization_blueprint.route("/<uuid:organization_id>", methods=["POST"])
|
||||||
|
|||||||
Reference in New Issue
Block a user