Getting the testing formspecs working with requests and nested functions, bugfixes like crazy

This commit is contained in:
Nathan Schneider
2021-08-03 23:37:31 -06:00
parent 97d540715a
commit 3775f77c2e
2 changed files with 29 additions and 27 deletions

View File

@@ -280,18 +280,14 @@ function modpol.orgs:has_member(user)
end
-- ==================================
-- returns a list of users in an org
function modpol.orgs:list_member()
local str
for k, v in ipairs(self.members) do
-- checking to see if member name is valid
if str and str ~= '' then
str = str .. '\n' .. v
else
str = v
end
end
return str
-- Function: modpol.orgs:list_members()
-- output: a table of the names (string) of members
function modpol.orgs:list_members()
local members = {}
for k, v in ipairs(self.members) do
table.insert(members, v)
end
return members
end
-- ==============================