Books list: make the buttons work like in the form
This commit is contained in:
@@ -107,7 +107,7 @@ export async function postImportBook(id, language) {
|
||||
}
|
||||
|
||||
export async function putReadBook(bookId) {
|
||||
return genericPayloadCall('/ws/book/' + bookId, { read: true }, 'PUT')
|
||||
return putEndReadDate(bookId, new Date().toISOString().slice(0, 10))
|
||||
}
|
||||
|
||||
export async function putUnreadBook(bookId) {
|
||||
@@ -126,6 +126,10 @@ export async function putStartReadDateUnset(bookId) {
|
||||
return genericPayloadCall('/ws/book/' + bookId, { startDate: 'null' }, 'PUT')
|
||||
}
|
||||
|
||||
export async function putStartRead(bookId) {
|
||||
return putStartReadDate(bookId, new Date().toISOString().slice(0, 10))
|
||||
}
|
||||
|
||||
export async function putStartReadDate(bookId, startdate) {
|
||||
return genericPayloadCall('/ws/book/' + bookId, { startDate: startdate }, 'PUT')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user