I've pretty much copied from User on both the frontend and backend to make a Client model. When I try to call it from the frontend though, I get no results. If I go to find and comment out the .where() call, it returns properly and if I go to actionUtils.js and return {} from parseCriteria, it works fine. I don't understand why the dump of where looks different when I'm calling /v1/user than it does when I'm calling /v1/client. Any ideas? Below are the dumps of the where for each call...
$sails.get('/v1/user', params)...
{ sort: 'id',
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI1Njk2ODExOTk1ZDJhYmQ0MDk4MDBlZTYiLCJmaXJzdE5hbWUiOiJLZW4iLCJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzTGV2ZWwiOjIsInR5cGUiOiJ1c2VyIiwiaWF0IjoxNDUzMzEwMzIzfQ.Mg1iw_2WiP9UWSxOmONjZeA6Nh0mRIi9vOrlGGulGZs' } {} []
$sails.get('/v1/client', params)...
{ params:
{ sort: 'id',
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI1Njk2ODExOTk1ZDJhYmQ0MDk4MDBlZTYiLCJmaXJzdE5hbWUiOiJLZW4iLCJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzTGV2ZWwiOjIsInR5cGUiOiJ1c2VyIiwiaWF0IjoxNDUzMzEwMzIzfQ.Mg1iw_2WiP9UWSxOmONjZeA6Nh0mRIi9vOrlGGulGZs' } }
But the client.model.js file and user.model.js file making the calls are identical, other than changing the work user to client wherever it exists...
I've pretty much copied from User on both the frontend and backend to make a Client model. When I try to call it from the frontend though, I get no results. If I go to find and comment out the .where() call, it returns properly and if I go to actionUtils.js and return {} from parseCriteria, it works fine. I don't understand why the dump of where looks different when I'm calling /v1/user than it does when I'm calling /v1/client. Any ideas? Below are the dumps of the where for each call...
$sails.get('/v1/user', params)...
{ sort: 'id',
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI1Njk2ODExOTk1ZDJhYmQ0MDk4MDBlZTYiLCJmaXJzdE5hbWUiOiJLZW4iLCJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzTGV2ZWwiOjIsInR5cGUiOiJ1c2VyIiwiaWF0IjoxNDUzMzEwMzIzfQ.Mg1iw_2WiP9UWSxOmONjZeA6Nh0mRIi9vOrlGGulGZs' } {} []
$sails.get('/v1/client', params)...
{ params:
{ sort: 'id',
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiI1Njk2ODExOTk1ZDJhYmQ0MDk4MDBlZTYiLCJmaXJzdE5hbWUiOiJLZW4iLCJ1c2VybmFtZSI6ImFkbWluIiwiYWNjZXNzTGV2ZWwiOjIsInR5cGUiOiJ1c2VyIiwiaWF0IjoxNDUzMzEwMzIzfQ.Mg1iw_2WiP9UWSxOmONjZeA6Nh0mRIi9vOrlGGulGZs' } }
But the client.model.js file and user.model.js file making the calls are identical, other than changing the work user to client wherever it exists...