Created
January 7, 2015 17:19
-
-
Save gregturn/403b5e34e2dce9de1d19 to your computer and use it in GitHub Desktop.
cujo rest DELETE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rest({method: 'DELETE', path: item._links.gallery.href}) | |
| .done(function() { | |
| findLinkedItem(item).remove(); | |
| $('#images ul').append(createItemRow(item)); | |
| }); |
Author
Author
Ahh. Nice! Well, taken that, I think I found something perfect for my situation:
item.clientFor('gallery')({method: 'DELETE'})
.done(function(response) {
if (response.status.code >= 200 && response.status.code < 300) {
findLinkedItem(item).remove();
$('#images ul').append(createItemRow(item));
}
});
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks. For some reason, Spring Data REST stopped handling this delete operation, but I didn't realize it because the follow function, which moved the item in the DOM happened anyway. I'll try it out.