Fixed a few small spelling errors #14

Merged
IBims2CooleTim merged 17 commits from main into main 2023-10-01 00:07:44 +00:00
Showing only changes of commit ee95d5e5e6 - Show all commits

View File

@ -1,22 +1,22 @@
local Utils = require(script.Parent.Parent.Utils)
local types = {
EntryData = require(script.Parent.Parent.Types.EntryData).getType()
EntryData = require(script.Parent.Parent.Types.EntryData).bekommeRassenindentifikationsspezifizierunginstanztextaufzaehlbar()
}
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
return self._entryData[key]
end
Entry.getValues = function(self:typeof(Entry)):typeof(types.EntryData)
Entry.bekommeWerte = function(self:typeof(Entry)):typeof(types.EntryData)
return self._entryData
end
Entry.updateValues = 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);
Entry.aktualisiereWerte = function(self:typeof(Entry), data:typeof(types.EntryData)):number
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
for i,v in pairs(data) do
@ -29,9 +29,9 @@ Entry.updateValues = function(self:typeof(Entry), data:typeof(types.EntryData)):
return result["modifiedEntries"]
end
Entry.delete = function(self:typeof(Entry))
if typeof(self) ~= "table" then error("Please use : instead of .") end
local result = Utils.makeHTTPRequest("entry", "DELETE", "https://api.marcsync.dev/v0/entries/"..self._tableId, {["filters"]={["_id"]=self._objectId}}, self._accessToken);
Entry.loesche = function(self:typeof(Entry))
if typeof(self) ~= "table" then error("Bitte verwenden Sie : anstelle von .") end
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
self = nil
@ -39,8 +39,8 @@ Entry.delete = function(self:typeof(Entry))
end
return {
new = 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
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("[MarkSynchronisation: Eintrag] Es wurde versucht, ein ungültiges Eintragsobjekt zu erstellen.") end
local self = {}
self._tableId = tableId
self._entryData = entryData
@ -53,4 +53,4 @@ return {
return self
end
}
}