Handle deleting library items

This commit is contained in:
ronaldheft
2022-08-11 14:12:45 -04:00
parent 8edeefc1cd
commit 60cb5f398c
7 changed files with 40 additions and 22 deletions
+2 -2
View File
@@ -81,7 +81,7 @@ public class AbsDatabase: CAPPlugin {
@objc func getLocalLibraryItem(_ call: CAPPluginCall) {
do {
let item = Database.shared.getLocalLibraryItem(localLibraryItem: call.getString("id") ?? "")
let item = Database.shared.getLocalLibraryItem(localLibraryItemId: call.getString("id") ?? "")
switch item {
case .some(let foundItem):
call.resolve(try foundItem.asDictionary())
@@ -97,7 +97,7 @@ public class AbsDatabase: CAPPlugin {
@objc func getLocalLibraryItemByLId(_ call: CAPPluginCall) {
do {
let item = Database.shared.getLocalLibraryItemByLLId(libraryItem: call.getString("libraryItemId") ?? "")
let item = Database.shared.getLocalLibraryItem(byServerLibraryItemId: call.getString("libraryItemId") ?? "")
switch item {
case .some(let foundItem):
call.resolve(try foundItem.asDictionary())