summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-08-23 15:25:45 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-08-23 15:35:34 +0200
commit18eb19ab42ffa99df5809000256d7de0ecb31976 (patch)
tree9cd004ee568261af3c59b9f11f084a28e81d7ce8
parent4cc2ca61fdf9b899a41ab60bfe58eeacd113ac0e (diff)
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, }
-rw-r--r--src/rest.c1
1 files changed, 1 insertions, 0 deletions
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));