comparison mod_http_admin_api/mod_http_admin_api.lua @ 4364:49cf9d188b26

mod_http_admin_api: set content-type for debug API
author Jonas Schäfer <jonas@wielicki.name>
date Thu, 21 Jan 2021 15:51:07 +0100
parents 636d56bbad97
children f975a4d31f35
comparison
equal deleted inserted replaced
4363:636d56bbad97 4364:49cf9d188b26
334 property = sub_path; 334 property = sub_path;
335 end 335 end
336 end 336 end
337 337
338 if property == "groups" then 338 if property == "groups" then
339 event.response.headers["Content-Type"] = json_content_type;
339 return json.encode(get_user_groups(username)); 340 return json.encode(get_user_groups(username));
340 elseif property == "debug" then 341 elseif property == "debug" then
342 event.response.headers["Content-Type"] = json_content_type;
341 return json.encode(get_user_debug_info(username)); 343 return json.encode(get_user_debug_info(username));
342 end 344 end
343 345
344 local user_info = get_user_info(username); 346 local user_info = get_user_info(username);
345 if not user_info then 347 if not user_info then