diff --git a/api/api.py b/api/api.py index 7c85b5c..f4b71e2 100644 --- a/api/api.py +++ b/api/api.py @@ -52,7 +52,6 @@ def post(self) -> tuple: 200 (OK): On success. 401 (Unauthroized): When username or password are incorrect. 422 (Unprocessable Entitiy): When the username or password can't be parsed. - 500 (Internal Server Error): On API error. Example: curl -X POST @@ -106,7 +105,6 @@ def get(self, queue: str, number: int) -> tuple: Return Codes: 200 (OK): On success. - 500 (Internal Server Error): On API error. Example: /api/ce/100 returns: @@ -143,7 +141,6 @@ def get(self, queues: str) -> tuple: Return Codes: 200 (OK): On success. - 500 (Internal Server Error): On API error. Args: queues (str): Plus (+) deliminited list of queues. @@ -161,9 +158,12 @@ def get(self, queues: str) -> tuple: class QueueList(Resource): @jwt_required - def get(self) -> list: + def get(self) -> tuple: """Returns a list of dictionaries with the number of items in each queue. + Return Codes: + 200 (OK): On success. + Example: [ { @@ -177,9 +177,9 @@ def get(self) -> list: ] Returns: - list: Dictionaries with the number of items in each queue. + tuple: Queues and item counts as JSON and HTTP response code. """ - return ECNQueue.getQueueCounts() + return (ECNQueue.getQueueCounts(), 200)