I had my users page displaying users but then when I stopped working on the code for a while and came back to it I am getting an error which says "Error while processing route: users Unexpected end of JSON input SyntaxError: Unexpected end of JSON input" and also "Uncaught SyntaxError: Unexpected end of JSON input"
I don't know where to start on trying to fix this issue.
Here is the front-end code in the route file users.js:
model() {
return this.get("store").findAll("user");
},
Here is the api code in the users controller:
# GET /users
def index
render jsonapi: User.all
end
Aucun commentaire:
Enregistrer un commentaire