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

New List / Item Update method #1705

Closed
JedWatson opened this issue Oct 5, 2015 · 9 comments
Closed

New List / Item Update method #1705

JedWatson opened this issue Oct 5, 2015 · 9 comments
Assignees
Milestone

Comments

@JedWatson
Copy link
Member

To enable RESTful API support for the Admin UI (as well as custom API routes), we need a new List.prototype.updateItem method to replace List.prototype.getUpdateHandler.

This is a placeholder issue while I work out what the API should actually look like, but in particular it needs to allow for Fields to hook their own update and async logic in, rather than having it built into the core function as is the case with the UpdateHandler functionality.

Probably relates to #1563, how we handle files will be an important part of how the method works.

Once the single-item update is working, we need to make a call on continuing to support the UpdateHandler as it is, or whether it can be implemented as a wrapper for the new method. I'd like to avoid breaking the API for 0.3 > 0.4 if possible, but this is an area that really needs to be cleaned up.

@JedWatson
Copy link
Member Author

Status update: basic field updates work now (where Field.prototype.updateItem is sufficient); needs more testing around validation, and needs to support async update processes (e.g. file upload)

@ericelliott
Copy link
Contributor

👍

@ericelliott ericelliott mentioned this issue Dec 3, 2015
7 tasks
@ericelliott
Copy link
Contributor

Thank you! I was just trying to dig into these details. =) You read my mind!

(∩`-´)⊃━☆゚.*・。゚

@ericelliott
Copy link
Contributor

Where are the API tests?

Also, can you point me to any examples of API usage in the client or server code?

@JedWatson
Copy link
Member Author

There aren't any tests yet for the REST API (we should add some as part of this work), the field types have a /test folder under each /fields/types/{type} which directly tests the field type class

@ericelliott
Copy link
Contributor

Cool. I've been reading up a bit more on lists and field types in the docs. I'll play with it a bit more and try to soak up enough context to write good tests. =)

@wmertens
Copy link
Contributor

wmertens commented Aug 3, 2016

Note that the exact implementation is still being discussed at #3209

@JedWatson
Copy link
Member Author

This is done now, good to close!

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

No branches or pull requests

4 participants