summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rest.c b/src/rest.c
index bd28b67..84018fb 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -2499,6 +2499,8 @@ static json_t *og_json_image_alloc(struct og_image *image)
json_integer(image->id));
json_object_set_new(image_json, "repo_id",
json_integer(image->repo_id));
+ json_object_set_new(image_json, "description",
+ json_string(image->description));
return image_json;
}
@@ -2538,7 +2540,8 @@ static int og_cmd_images(char *buffer_reply)
" i.clonator, i.compressor, "
" i.filesystem, i.datasize, "
" i.idperfilsoft, i.tipo, "
- " i.idimagen, i.idrepositorio "
+ " i.idimagen, i.idrepositorio, "
+ " i.descripcion "
"FROM imagenes i "
"LEFT JOIN ordenadores o "
"ON i.idordenador = o.idordenador ");
@@ -2552,6 +2555,8 @@ static int og_cmd_images(char *buffer_reply)
image.repo_id = dbi_result_get_ulonglong(result, "idrepositorio");
snprintf(image.name, sizeof(image.name), "%s",
dbi_result_get_string(result, "nombreca"));
+ snprintf(image.description, sizeof(image.description), "%s",
+ dbi_result_get_string(result, "descripcion"));
og_get_image_stats(image.name, &image.image_stats);