From 1ce56240323c21e3e3251dfd6173cb45ae959574 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 30 Nov 2023 10:04:19 +0100 Subject: rest: fix client/info maintenance field Use computer.maintenance instead of computer.name. Fixes: af47a082adb1 ("#1004 Add GET /client/info HTTP REST method") --- src/rest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rest.c b/src/rest.c index 8bbe063..f177e4c 100644 --- a/src/rest.c +++ b/src/rest.c @@ -1708,7 +1708,7 @@ static int og_cmd_get_client_info(json_t *element, json_integer(computer.hardware_id)); json_object_set_new(root, "server_id", json_integer(computer.server_id)); json_object_set_new(root, "netdriver", json_string(computer.netdriver)); - json_object_set_new(root, "maintenance", json_boolean(computer.name)); + json_object_set_new(root, "maintenance", json_boolean(computer.maintenance)); json_object_set_new(root, "netiface", json_string(computer.netiface)); json_object_set_new(root, "repo_id", json_integer(computer.repo_id)); json_object_set_new(root, "livedir", json_string(computer.livedir)); -- cgit v1.2.3-18-g5258