Collections: allow to drag and drop to change book position

This commit is contained in:
2026-04-12 01:44:25 +02:00
parent d2fe3bf34f
commit 178c688203
15 changed files with 328 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ export function postCollection(collection) {
return genericPayloadCall('/ws/collection', collection, 'POST')
}
export function postCollectionAddBook(collectionId, bookId) {
export function postCollectionAddBook(collectionId, position) {
return genericPayloadCall(
'/ws/collection/' + collectionId + '/addbook',
{ bookId: bookId },
@@ -138,6 +138,14 @@ export function postCollectionAddBook(collectionId, bookId) {
)
}
export function postCollectionChangePosition(collectionId, itemId, position) {
return genericPayloadCall(
'/ws/collection/' + collectionId + '/changeposition',
{ itemId: itemId, position: position },
'POST',
)
}
export function putBook(id, book) {
return genericPayloadCall('/ws/book/edit/' + id, book.value, 'PUT')
}