summaryrefslogtreecommitdiffstats
path: root/src/dbi.h
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-10-14 14:43:15 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-14 17:31:43 +0200
commitd8b78bb9221866a544066b551c6d31188adf4035 (patch)
treedd0da441c0460ecd3f367da51c65da2d55799268 /src/dbi.h
parentd2f20d0be06617f421eecca111449d94672695eb (diff)
#942 Extend GET /images function
This extension removes replaces the field 'filename' for 'name' and adds new fields (software_id, type and id). These new fields are useful when restoring an image. Request: GET /images Response: 200 OK { "disk": { "free": 37091418112, "total": 52573995008 }, "images": [ { "datasize": 5939200000, "id": 25, "modified": "Wed Oct 14 11:49:00 2020", "name": "archlinux", "permissions": "744", "size": 1844222333, "software_id": 19, "type": 1 } ] }
Diffstat (limited to 'src/dbi.h')
-rw-r--r--src/dbi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dbi.h b/src/dbi.h
index 8cd6fe6..1daaeb8 100644
--- a/src/dbi.h
+++ b/src/dbi.h
@@ -51,10 +51,12 @@ struct og_image_legacy {
struct og_image {
char name[OG_DB_IMAGE_NAME_MAXLEN + 1];
char description[OG_DB_IMAGE_DESCRIPTION_MAXLEN + 1];
- const char *filename;
+ uint64_t software_id;
uint64_t center_id;
uint64_t datasize;
uint64_t group_id;
+ uint64_t type;
+ uint64_t id;
struct stat image_stats;
};