Slim down the /organisations response

At the moment this response returns a list of service IDs for hundreds
of organisations.

The admin app doesn’t use this information, but having to wait for it to
be serialized and sent across the network slows it down all the same.
This commit is contained in:
Chris Hill-Scott
2019-06-13 15:54:57 +01:00
parent 4dd245ca87
commit 0955403a3b
4 changed files with 29 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ def handle_integrity_error(exc):
@organisation_blueprint.route('', methods=['GET'])
def get_organisations():
organisations = [
org.serialize() for org in dao_get_organisations()
org.serialize_for_list() for org in dao_get_organisations()
]
return jsonify(organisations)