Skip to content

Changed success code + Fix for nested resource + Unit tests #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mblarsen
Copy link

@mblarsen mblarsen commented Jul 6, 2014

Changed the default behaviour off successful request for CREATE and DELETE to respond with 201 and 204 respectfully.

@mblarsen
Copy link
Author

mblarsen commented Jul 6, 2014

I've added a simple test suite, because I had some problems with naming nested resources, when there is more than one.

The last test, which is the nested with renamed resources, fails. Perhaps I'm doing it all wrong.

      rest.resource('users');
      rest.resource('users', 'projects', { projects_resource: 'books' });
      rest.resource('users', 'projects', 'todos', { projects_resource: 'books', todos_resource: 'tasks' });

@mblarsen
Copy link
Author

mblarsen commented Jul 6, 2014

Latest commit has a fix to lib/api.js with regards to nested resources with alternate names, thus the test suites is all green :)

@mblarsen mblarsen changed the title Changed code for CREATE, DELETE to 201 and 204 Changed success code + Fix for nested resource + Unit tests Jul 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant