Feature: added contacted and confirmed users endpoints for ads and li…#526
Feature: added contacted and confirmed users endpoints for ads and li…#526
Conversation
…stings. Added roommate endpoints but don't work because there isn't a roommate viewSet and a roommateSerializer
|
Maybe we should change this ticket to blocked then add another ticket to make the roommateViewSet and serializer |
There was a problem hiding this comment.
@luyaojchen @bringuy PR is looking good! I added some small requested changes for the names of some classes and for some copy-pasted comments.
I think you should finish implementing the serializers and model view set for roommate posts. It should be very straight forward. You can follow a very similar approach taken for listings.
Also, we can get rid of the AbstractLikedUsers class and replace all usages with the AbstractRetrieveUsers class.
I think you can make the missing components for the roommate posts endpoint. Just follow the same pattern used for listings. |
|
Whoops, I closed the PR by accident :3 |
| @method_decorator(name="get", decorator=swagger_auto_schema(tags=["Ads"])) | ||
| class AdContacted(AbstractRetrieveUsers): | ||
| model_class = Ad | ||
| query_string = "contacted_users" | ||
|
|
||
|
|
||
| @method_decorator(name="get", decorator=swagger_auto_schema(tags=["Ads"])) | ||
| class AdConfirmed(AbstractRetrieveUsers): | ||
| model_class = Ad | ||
| query_string = "confirmed_users" |
There was a problem hiding this comment.
I also forgot to say to rename these too. My bad.
| path("roommate/<int:id>/contacted", RoommatePostContactedUsers.as_view()), | ||
| path("roommate/<int:id>/confirmed", RoommatePostConfirmedUsers.as_view()), | ||
| ] | ||
|
|
…stings. Added roommate endpoints but they're commented out because there isn't a roommate viewSet and a roommateSerializer