Add setData

This commit is contained in:
insweater 2015-02-05 18:32:01 +03:00
parent 0cd8fef256
commit 7725bdd3ed

View File

@ -99,4 +99,11 @@ function GJ.fetchData(key, isGlobal)
return string.sub(d, string.find(d, "\n"), string.len(d)) return string.sub(d, string.find(d, "\n"), string.len(d))
end end
function GJ.setData(key, data, isGlobal)
local pu, pt = true, true
if isGlobal then pu, pt = false, false end
return string.find(req("data-store/set/?key=" .. key .. "&data=" .. tostring(data), "dump", pu, pt), "SUCCESS") ~= nil
end
return GJ return GJ