From aa50c29edf14e3e1d00cdd32ae67c204ef091973 Mon Sep 17 00:00:00 2001 From: Marcel Lorbeer Date: Sun, 1 Oct 2023 02:44:54 +0200 Subject: [PATCH] Update MarcSyncv1.0.lua --- src/MarcSync/MarcSyncv1.0.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MarcSync/MarcSyncv1.0.lua b/src/MarcSync/MarcSyncv1.0.lua index c8dab92..215c107 100644 --- a/src/MarcSync/MarcSyncv1.0.lua +++ b/src/MarcSync/MarcSyncv1.0.lua @@ -16,7 +16,7 @@ MarcSyncClient.bekommeVersion = function(self:typeof(MarcSyncClient), clientId: return result["version"] end -MarcSyncClient.erzeugeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).new()) +MarcSyncClient.erzeugeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).neu()) if not self._accessToken then error("[MarkSynchronisation] Bitte legen Sie ein Token fest, bevor Sie MarcSync verwenden.") end if not collectionName then error("Kein CollectionName angegeben") end local result = Utils.macheHypertexttransferprotokollAnfrage("collection", "POST", "https://api.marcsync.dev/v0/collection/"..collectionName, {}, self._accessToken); @@ -26,17 +26,17 @@ MarcSyncClient.erzeugeSammlung = function(self:typeof(MarcSyncClient), collectio return result end -MarcSyncClient.bringeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).new()) +MarcSyncClient.bringeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).neu()) self:_checkInstallation() if not collectionName then error("Kein CollectionName angegeben") end local result = Utils.macheHypertexttransferprotokollAnfrage("collection", "GET", "https://api.marcsync.dev/v0/collection/"..collectionName, {}, self._accessToken); - + if not result["success"] then error(result["errorMessage"]) end result = require(script.Parent.Objects.Sammlung).neu(collectionName, self._accessToken) return result end -MarcSyncClient.bekommeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).new()) +MarcSyncClient.bekommeSammlung = function(self:typeof(MarcSyncClient), collectionName: string):typeof(require(script.Parent.Objects.Sammlung).neu()) if typeof(self) ~= "table" then error("Bitte verwenden Sie : anstelle von .") end self:_checkInstallation() if not collectionName then error("Kein CollectionName angegeben") end