mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Remove extra system.hostname property from /api/sysinfo. It is already contained as system.uname.nodename of the very same API endpoint
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -302,11 +302,6 @@ components:
|
||||
description: Device model (if available, `null` otherwise)
|
||||
example: "Raspberry Pi Model 4B"
|
||||
nullable: true
|
||||
hostname:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Hostname of the device
|
||||
example: "raspberrypi"
|
||||
dns:
|
||||
$ref: 'dns.yaml#/components/schemas/blocking'
|
||||
uname:
|
||||
|
||||
@@ -378,16 +378,6 @@ int get_system_obj(struct ftl_conn *api, cJSON *system)
|
||||
if(f_model)
|
||||
fclose(f_model);
|
||||
|
||||
// Add hostname to system object
|
||||
char hostname[256] = { 0 };
|
||||
if(gethostname(hostname, sizeof(hostname)) != 0)
|
||||
{
|
||||
log_warn("gethostname() failed: %s", strerror(errno));
|
||||
JSON_ADD_NULL_TO_OBJECT(system, "hostname");
|
||||
}
|
||||
else
|
||||
JSON_COPY_STR_TO_OBJECT(system, "hostname", hostname);
|
||||
|
||||
cJSON *dns = JSON_NEW_OBJECT();
|
||||
const bool blocking = get_blockingstatus();
|
||||
JSON_ADD_BOOL_TO_OBJECT(dns, "blocking", blocking); // same reply type as in /api/dns/status
|
||||
|
||||
Reference in New Issue
Block a user