# HG changeset patch # User Matthew Wild # Date 1611147093 0 # Node ID 7f1f3b79d991a12fdc36ce0f32475d33e10e9de0 # Parent 76bec3f66b2434d22973c913ce7fa5ea25917f6f mod_http_admin_api: Return new group object on successful creation diff -r 76bec3f66b24 -r 7f1f3b79d991 mod_http_admin_api/mod_http_admin_api.lua --- a/mod_http_admin_api/mod_http_admin_api.lua Tue Jan 19 20:36:41 2021 +0000 +++ b/mod_http_admin_api/mod_http_admin_api.lua Wed Jan 20 12:51:33 2021 +0000 @@ -255,7 +255,12 @@ if not ok then return 500; end - return 200; + + event.response.headers["Content-Type"] = json_content_type; + return json.encode({ + id = group.id or group.name; + name = group.name; + }); end function delete_group(event, group_id) --luacheck: ignore 212/event