comparison mod_http_admin_api/mod_http_admin_api.lua @ 4375:03cf0d41b272

mod_http_admin_api: Allow specifying groups in account invite
author Matthew Wild <mwild1@gmail.com>
date Sat, 23 Jan 2021 12:52:48 +0000
parents e707810a943e
children d4e0e4d22fc7
comparison
equal deleted inserted replaced
4374:e707810a943e 4375:03cf0d41b272
168 if not options.groups then 168 if not options.groups then
169 return 400; 169 return 400;
170 end 170 end
171 invite = invites.create_group(options.groups, nil, options.ttl); 171 invite = invites.create_group(options.groups, nil, options.ttl);
172 elseif invite_type == "account" then 172 elseif invite_type == "account" then
173 invite = invites.create_account(options.username, nil, options.ttl); 173 invite = invites.create_account(options.username, {
174 groups = options.groups;
175 }, options.ttl);
174 else 176 else
175 return 400; 177 return 400;
176 end 178 end
177 if not invite then 179 if not invite then
178 return 500; 180 return 500;