This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,28 @@
--[[
{
upVotes : number ,
downVotes : number ,
userVote : bool or nil,
canVote : bool ,
cantVoteReason : string ,
}
]]
local VoteData = {}
function VoteData.new()
local self = {}
return self
end
function VoteData.fromJsonData(voteJson)
local self = VoteData.new()
self.upVotes = voteJson.UpVotes
self.downVotes = voteJson.DownVotes
self.userVote = voteJson.UserVote
self.canVote = voteJson.CanVote
self.cantVoteReason = voteJson.ReasonForNotVoteable
return self
end
return VoteData