add end read date
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user