Hey guys, so I've read through the following posts hoping they would help but they just tell me how to do what I'm doing, not why I'm getting the bad/truncated request url encoding I'm seeing:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
On to my Issue:
I have a db list service and have added a "where" request parameter so I can filter my results to only show the rows owned by a specific user (pointed to in db).
Both the Test tab and a live run of the service works perfectly if I enter the complete 'where' query string into the request field, below is the query I'm adding to 'where':
{"owner": {"collName":"users", "id":"533f001ae4b013c661e5b884"}}
In Chrome Dev tools I see this succesful request header when run:
https://api.appery.io/rest/1/db/colle...
But of course I need to pull the correct/current userID from localStorage so I only display their records. I add the following JS to do so:
code
var currentUser = localStorage.getItem('user_id');
return {"owner": {"collName":"users", "id": currentUser}};
/code
This is where I get my "Incorrect query" error and see the request header has been sent as:
https://api.appery.io/rest/1/db/colle...
I've also tried draggin my local storage value over with a connection and adding JS referencing it as value, same issue.
I've done this for other types of queries, not sure why this isn't working but its had me troubleshooting for hours now.