From 8e687e300adc377a76e6a9b6d91aaeb56172a126 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand <benjamin.bertrand@esss.se> Date: Wed, 10 Jan 2018 22:04:34 +0100 Subject: [PATCH] Change status API endpoint to statuses All endpoints are plural --- app/api/inventory.py | 4 ++-- tests/functional/test_api.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/inventory.py b/app/api/inventory.py index 91d0b1f..8af2af5 100644 --- a/app/api/inventory.py +++ b/app/api/inventory.py @@ -174,13 +174,13 @@ def create_locations(): return create_generic_model(models.Location) -@bp.route('/status') +@bp.route('/statuses') @jwt_required def get_status(): return get_generic_model(models.Status) -@bp.route('/status', methods=['POST']) +@bp.route('/statuses', methods=['POST']) @jwt_required @jwt_groups_accepted('admin', 'create') def create_status(): diff --git a/tests/functional/test_api.py b/tests/functional/test_api.py index 81a16f8..8ef3c98 100644 --- a/tests/functional/test_api.py +++ b/tests/functional/test_api.py @@ -21,7 +21,7 @@ ENDPOINT_MODEL = { 'inventory/manufacturers': models.Manufacturer, 'inventory/models': models.Model, 'inventory/locations': models.Location, - 'inventory/status': models.Status, + 'inventory/statuses': models.Status, 'inventory/items': models.Item, 'network/networks': models.Network, 'network/interfaces': models.Interface, -- GitLab