diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2023-12-19 12:02:55 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2023-12-19 12:20:34 +0100 |
commit | 7292c306593b348463916130c23b86a9021866f1 (patch) | |
tree | 8cc0d2f6194fa489a7ee47d0e9d7c0759b9e424d /src/dbi.h | |
parent | bad351b1d738c3ca42d2516c643bf9b5f5144c57 (diff) |
rest: no assumption on description field in create/imagev1.2.5-7
do not use description field to decide if this is a new image or an update.
add og_dbi_get_image() to check if the image exists. If it is not found, then
add new image entry to database.
update og_dbi_add_image() to update the image.id field.
Diffstat (limited to 'src/dbi.h')
-rw-r--r-- | src/dbi.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -119,7 +119,8 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer, struct in_addr addr); int og_dbi_get_room_info(struct og_dbi *dbi, struct og_room *room, uint32_t room_id); -int og_dbi_add_image(struct og_dbi *dbi, const struct og_image *image); +bool og_dbi_get_image(struct og_dbi *dbi, struct og_image *image); +int og_dbi_add_image(struct og_dbi *dbi, struct og_image *image); int og_dbi_schema_update(void); |