Michael C
04/05/2023, 6:45 PM/api/orders/current
should accept a guest token — X-Spree-Order-Token
— for authorization, however that endpoint returns a 401 when using a guest token.
I would expect it to return the guest order associated with that token, no?Chris Todorov
04/05/2023, 6:58 PMMichael C
04/05/2023, 6:59 PM{
"error": "You are not authorized to perform that action."
}
Chris Todorov
04/05/2023, 6:59 PM/api/orders/current
doesn’t make much sense, you may just want to fetch the order that token belongs toMichael C
04/05/2023, 7:00 PMChris Todorov
04/05/2023, 7:01 PMMichael C
04/05/2023, 7:02 PMMichael C
04/05/2023, 7:02 PMChris Todorov
04/05/2023, 7:03 PMMichael C
04/05/2023, 7:04 PMChris Todorov
04/05/2023, 7:05 PMChris Todorov
04/05/2023, 7:06 PMpry
might help confirm what is going onChris Todorov
04/05/2023, 7:07 PMorder_id
or order_number
is provided I am not sure how that would do the right thing 😕Michael C
04/05/2023, 7:08 PMChris Todorov
04/05/2023, 7:09 PMChris Todorov
04/05/2023, 7:10 PMMichael C
04/05/2023, 7:10 PM/api/orders/:number
rather than try to use the same endpoint for both — though it would be nice.Chris Todorov
04/05/2023, 7:12 PMcurrent_api_user
so I agree with you 👍 https://github.com/solidusio/solidus/blob/master/api/app/controllers/spree/api/orders_controller.rb#L89-L93kennyadsl
Michael C
04/05/2023, 7:56 PMkennyadsl
kennyadsl
kennyadsl
Chris Todorov
04/05/2023, 8:00 PMMichael C
04/05/2023, 8:01 PM