mirror of
https://gitlab.com/Alamantus/Readlebee.git
synced 2025-07-05 23:54:17 +02:00
Fix adding ShelfItem to Shelf
This commit is contained in:
parent
bf78174691
commit
86c5a3bc45
1 changed files with 2 additions and 2 deletions
|
@ -252,7 +252,7 @@ class ShelfController {
|
||||||
|
|
||||||
async addShelfItem(shelf, bookReferenceId, source = null) {
|
async addShelfItem(shelf, bookReferenceId, source = null) {
|
||||||
const bookReferenceController = new BookReferenceController(this.models, this.lang);
|
const bookReferenceController = new BookReferenceController(this.models, this.lang);
|
||||||
|
|
||||||
let bookId = bookReferenceId;
|
let bookId = bookReferenceId;
|
||||||
if (source !== null) {
|
if (source !== null) {
|
||||||
const bookReference = await bookReferenceController.createOrUpdateReference(source, bookId);
|
const bookReference = await bookReferenceController.createOrUpdateReference(source, bookId);
|
||||||
|
@ -265,7 +265,7 @@ class ShelfController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const shelfItem = await shelf.addShelfItem({ bookId }).catch(err => err);
|
const shelfItem = await shelf.createShelfItem({ bookId }).catch(err => err);
|
||||||
|
|
||||||
if (!shelfItem) {
|
if (!shelfItem) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Reference in a new issue