add end read date

This commit is contained in:
2025-11-21 18:13:09 +01:00
parent 3191a97ce8
commit 8c0a9fe431
13 changed files with 266 additions and 109 deletions

View File

@@ -49,8 +49,20 @@ export function postBook(book) {
return genericPayloadCall('/book', book.value, 'POST')
}
export async function putReadBook(bookId, payload) {
return genericPayloadCall('/book/' + bookId + "/read", payload, 'PUT')
export async function putReadBook(bookId) {
return genericPayloadCall('/book/' + bookId + "/read", {read: true}, 'PUT')
}
export async function putUnreadBook(bookId) {
return genericPayloadCall('/book/' + bookId + "/read", {read: false}, 'PUT')
}
export async function putEndReadDate(bookId, enddate) {
return genericPayloadCall('/book/' + bookId + "/read", {read: true, endDate: enddate}, 'PUT')
}
export async function putEndReadDateUnset(bookId) {
return genericPayloadCall('/book/' + bookId + "/read", {read: true, endDate: "null"}, 'PUT')
}
export async function putStartReadDateUnset(bookId) {