diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2023-08-23 15:25:45 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2023-08-23 15:35:34 +0200 |
commit | 18eb19ab42ffa99df5809000256d7de0ecb31976 (patch) | |
tree | 9cd004ee568261af3c59b9f11f084a28e81d7ce8 /src | |
parent | 4cc2ca61fdf9b899a41ab60bfe58eeacd113ac0e (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,
}
Diffstat (limited to 'src')
-rw-r--r-- | src/rest.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)); |