Skip to content
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

Find why i can't upload a new resource by the Rest API #3

Open
bricesanchez opened this issue Jul 20, 2016 · 4 comments
Open

Find why i can't upload a new resource by the Rest API #3

bricesanchez opened this issue Jul 20, 2016 · 4 comments
Labels

Comments

@bricesanchez
Copy link
Member

A message from @simi:

Hello @bricesanchez!

This is because you expect @resource in template, but only array of @resources is defined in controller.

I'm not sure how to handle this in returned views, but now you're returning only last image for example hence multiple images was created. Images works only because @image is defined in controller.

Probably you'll need to use separate views for show and create (just array of show view) to return list of created resources for create action.

@simi
Copy link
Member

simi commented Jul 20, 2016

If you'll tell me what's expected output I can help you here.

@bricesanchez
Copy link
Member Author

I would like the same feature of the CMS

@simi
Copy link
Member

simi commented Jul 20, 2016

But what does it mean? In refinery when you create resource you're redirected to resources list. But here in API you can create multiple resources, so I think it will make sense to return array of all created resources in JSON. Same stands for images. WDYT?

@bricesanchez
Copy link
Member Author

First step is to be able to create 1 resource with the API but if we can directly handle multiple resources, it will be great. So it make sense to return an array.

Feel free to provide a PR, i love to merge them :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants