Closed ricardotormo closed 3 years ago
@ricardotormo
Thanks for your contribution and reporting this bug to us !! We have added your updates on master branch here.
As your pull request exist with some extra updates so we manually updates your changes in our master directly.
1. Why is this change necessary?
There's a bug, so when you try to follow the API instructions, in order to fetch tickets, you can't fetch tickets based on a particular customer email.
2. What does this change do, exactly?
The code below has some problems, I guess:
The first line:
Should be:
Because the API should be expecting the get query params.
The third line:
Should be:
because $repository is not defined. I guess we want to access the $ticketRepository to get the customers.
3. Please link to the relevant issues (if any).
I opened a issue here: https://github.com/uvdesk/api-bundle/issues/16
It should be mentioned that if you try to filter by agent, that is still not working. If you try this endpoint: {my_localhost_url}/api/v1/tickets?actAsEmail={agent@agentemail.com}&actAsType=agent The API returns:
So I guess there's a problem with this line:
You could change $data['actAsEmail'] by $request->query->get('actAsEmail') and the error disappear. The problem is that after that, if we try to filter by agent email the API returns all the tickets everytime.