Closed Shopiley closed 1 year ago
Problem 1: GET messages endpoint was returning ‘internal server error’ for rooms with no messages.
Fix: I fixed this in the paginator.py file by putting a check for if messages is None before going on with the pagination logic.
Problem 2: After the first fix, the endpoint would return a “detail: room does not exist or no message found” message for a room with no messages.
Fix: I changed this to return the same data structure as when a message exists, but with the data array empty as seen below.
Problem 1: GET messages endpoint was returning ‘internal server error’ for rooms with no messages.
Fix: I fixed this in the paginator.py file by putting a check for if messages is None before going on with the pagination logic.
Problem 2: After the first fix, the endpoint would return a “detail: room does not exist or no message found” message for a room with no messages.
Fix: I changed this to return the same data structure as when a message exists, but with the data array empty as seen below.