No, that's not what I meant.
Only the order of the channel IDs specified will be changed
In your example 1, c
has moved as well, even though only d
and b
were given.
To move a channel up or down...
This is equivalent to swapping two adjacent items.
I didn't give an example of setting the order of three items because I couldn't think of a UI where it would make sense, but it is still possible.
The nice thing about this approach is that the same update logic works for all the use cases, and doesn't matter how many items are in the list, and is atomic.
@aaronpk @brentsimmons Thank you! Why would anyone put more than one feed on a page?
Working on implementing this in together now, I'm sure there is a valid reason, but I'm just wondering why the _id
is different from the paging before and after values, could they not be the same?
The before
and after
values are meant to represent pages of data, not necessarily individual records. In my case, the after
value refers to an item that isn't in the current page. I could return a string for _id
that looks more like the before
and after
strings, but that's just an implementation detail of my server. Alternately I may switch my before
/after
strings to look more like the current _id
value. Either way, this difference doesn't seem important to the client.