From 18eb19ab42ffa99df5809000256d7de0ecb31976 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Wed, 23 Aug 2023 15:25:45 +0200 Subject: rest: return server_id in GET /client/info struct og_computer holds the value of "identorno" column inside the server_id field. Extend GET /client/info payload with server_id. This way clients can get the associated server id when requesting client information. { ... "server_id": 1, } --- src/rest.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rest.c') diff --git a/src/rest.c b/src/rest.c index 2897572..2893de7 100644 --- a/src/rest.c +++ b/src/rest.c @@ -1536,6 +1536,7 @@ static int og_cmd_get_client_info(json_t *element, json_string(computer.serial_number)); json_object_set_new(root, "hardware_id", 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, "netiface", json_string(computer.netiface)); -- cgit v1.2.3-18-g5258