Revert "Bugfix/spelling error" #17

Closed
MarciiTheDev wants to merge 39 commits from revert-16-bugfix/SpellingError into main
Showing only changes of commit ee95d5e5e6 - Show all commits

View File

@ -1,22 +1,22 @@
local Utils = require(script.Parent.Parent.Utils) local Utils = require(script.Parent.Parent.Utils)
local types = { local types = {
EntryData = require(script.Parent.Parent.Types.EntryData).getType() EntryData = require(script.Parent.Parent.Types.EntryData).bekommeRassenindentifikationsspezifizierunginstanztextaufzaehlbar()
} }
local Entry = {} local Entry = {}
Entry.getValue = function(self:typeof(Entry), key:string):any Entry.bekommeWert = function(self:typeof(Entry), key:string):any
if not key then return nil end if not key then return nil end
return self._entryData[key] return self._entryData[key]
end end
Entry.getValues = function(self:typeof(Entry)):typeof(types.EntryData) Entry.bekommeWerte = function(self:typeof(Entry)):typeof(types.EntryData)
return self._entryData return self._entryData
end end
Entry.updateValues = function(self:typeof(Entry), data:typeof(types.EntryData)):number Entry.aktualisiereWerte = function(self:typeof(Entry), data:typeof(types.EntryData)):number
local result = Utils.makeHTTPRequest("entry", "PUT", "https://api.marcsync.dev/v0/entries/"..self._tableId, {["filters"]={["_id"]=self._objectId},["data"]=data}, self._accessToken); local result = Utils.macheHypertexttransferprotokollAnfrage("eintrag", "PUT", "https://api.marcsync.dev/v0/entries/"..self._tableId, {["filters"]={["_id"]=self._objectId},["data"]=data}, self._accessToken);
if result["success"] and result["modifiedEntries"] and result["modifiedEntries"] > 0 then if result["success"] and result["modifiedEntries"] and result["modifiedEntries"] > 0 then
for i,v in pairs(data) do for i,v in pairs(data) do
@ -29,9 +29,9 @@ Entry.updateValues = function(self:typeof(Entry), data:typeof(types.EntryData)):
return result["modifiedEntries"] return result["modifiedEntries"]
end end
Entry.delete = function(self:typeof(Entry)) Entry.loesche = function(self:typeof(Entry))
if typeof(self) ~= "table" then error("Please use : instead of .") end if typeof(self) ~= "table" then error("Bitte verwenden Sie : anstelle von .") end
local result = Utils.makeHTTPRequest("entry", "DELETE", "https://api.marcsync.dev/v0/entries/"..self._tableId, {["filters"]={["_id"]=self._objectId}}, self._accessToken); local result = Utils.macheHypertexttransferprotokollAnfrage("eintrag", "DELETE", "https://api.marcsync.dev/v0/entries/"..self._tableId, {["filters"]={["_id"]=self._objectId}}, self._accessToken);
if not result["success"] then error(result["errorMessage"]) end if not result["success"] then error(result["errorMessage"]) end
self = nil self = nil
@ -39,8 +39,8 @@ Entry.delete = function(self:typeof(Entry))
end end
return { return {
new = function(tableId:string, entryData:typeof(types.EntryData), accessToken:string):typeof(Entry) neu = function(tableId:string, entryData:typeof(types.EntryData), accessToken:string):typeof(Entry)
if not tableId or not entryData or not entryData["_id"] or not accessToken then error("[MarcSync: Entry] Tried creating invalid Entry Object.") end if not tableId or not entryData or not entryData["_id"] or not accessToken then error("[MarkSynchronisation: Eintrag] Es wurde versucht, ein ungültiges Eintragsobjekt zu erstellen.") end
local self = {} local self = {}
self._tableId = tableId self._tableId = tableId
self._entryData = entryData self._entryData = entryData
@ -53,4 +53,4 @@ return {
return self return self
end end
} }