Closed TimothyXu closed 2 years ago
If I had understood REST API in the last lecture, the correct API call for this should be GET on [our-service]/shopcarts . Do we agree?
For bookkeeping purposes: at Backlog Refinement meeting on 22 Feb we agreed it should indeed be GET
The current implementation for this story lists all 'shopcarts' as defined in our database schema, which includes all items. Is this the functionality we want? Or do we want our list_shopcarts method to return a list of all shopping carts with unique user_ids, as in the normal English meaning of shopcarts?
Oh, it is because I assume .all() returns all shopcarts not including items. Sorry that I didn’t check it. So, I think maybe we should change .all() in model.py to fix it?
I agree with this. But before we go ahead and make the change, is there any situation where we may want the other functionalities in model.py? (Would we ever need a .all_items or maybe a .all?) Regardless since we're doing DevOps and doing Minimum Viable Product we should just add what we need right now, which I agree is to list all shopcarts not including items.
I think getting all items only makes sense for a given shopcart, which is already implemented in find_shopcart.
I agree with this.
As a System Administrator I need to be able to use a REST API to list all shopcarts that exist at any given moment So that I can have access to every shopcart.
Details and Assumptions
Expect return a list of the shopcarts and status code 200
Acceptance Criteria