add gs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
local Modules = script.Parent.Parent
|
||||
|
||||
local WebApi = require(Modules.WebApi)
|
||||
|
||||
local SetFriendCount = require(Modules.Actions.SetFriendCount)
|
||||
|
||||
return function()
|
||||
return function(store)
|
||||
spawn(function()
|
||||
local status, totalCount = WebApi.GetFriendCount()
|
||||
if status ~= WebApi.Status.OK then
|
||||
store:dispatch(SetFriendCount(0)) -- Remember to come back and add status instead of setting to zero
|
||||
else
|
||||
store:dispatch(SetFriendCount(totalCount))
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user