Closed osmanyucel closed 3 years ago
Is this a bug or a feature? I won't change anything, at least until you've finished.
It's unexpected behavior, but likely to be desired. Something to keep in mind for designing API v2.
@osmanyucel want to help document the current API? https://github.com/bartervg/barter.vg/wiki
We could have a wiki page to list all current bugs and bad design issues, like this one. And consider them for API v2.
It's unexpected behavior, but likely to be desired. Something to keep in mind for designing API v2.
@osmanyucel want to help document the current API? https://github.com/bartervg/barter.vg/wiki
We could have a wiki page to list all current bugs and bad design issues, like this one. And consider them for API v2.
I don't think I can find the time to work on the documentation, but I can list the design issues I see with the current API and share with you. I wasn't going to bring it up but if you have an API v2 on the horizon already, I can share my opinions about the API design.
I'm not working on API v2. That would be done by @bartervg, but I don't think he started.
Also, I don't think this is the place to discuss all current API flaws, unless we convert this issue to it.
https://barter.vg/u/a4/o/1168888/json/
{"offer_id":1168888,"success":false,"error":"this offer is not associated with the user"}
https://barter.vg/u/11dc/o/1168888/json/
{"offer_id":1168888,"success":true,"from_user_id":"11dc" ... }
that may be a breaking change
Describe the bug
While calling the offer API, as long as you pass
offer_id
correctly, it doesn't matter what user ID you pass.Steps to reproduce the bug
user_id
passed isa4
the offer has nothing to do with that user.Expected behavior
It should work as either one of the following options:
user_id
while calling this API. (My personal preference is this, because it makes the API much easier to use)order_id
anduser_id
doesn't match, the API should return an error message.Screenshots
Additional context, device information (OS & Browser) if applicable