mardi 11 août 2015

Changing pluralized endpoint in SailsJS

Currently i have all my routes in Sails to be pluralized because im using ember. However i have an issue where Sails is not pluralizing a word properly.

I have a quiz model, and when i do a findAll on quiz it returns nothing. Come to find out after attempting to visit my sails endpoint /api/v1/quizzes i get nothing back. So i went ahead and tried /api/v1/quizs and it returns to me

{ "quizzes": [ array, of, my, quizzes] }

Does anyone know how i can force SailsJS to give the correct pluralized endpoint? Or do i need to just create the endpoint manually to return the data?

Aucun commentaire:

Enregistrer un commentaire