summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/rest.c b/src/rest.c
index 167f88f..b96cf49 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -4704,7 +4704,6 @@ static int og_cmd_post_center_delete(json_t *element,
const char *key, *msglog;
struct og_dbi *dbi;
dbi_result result;
- uint32_t image_id;
json_t *value;
int err = 0;
@@ -4749,32 +4748,6 @@ static int og_cmd_post_center_delete(json_t *element,
dbi_result_free(result);
- result = dbi_conn_queryf(dbi->conn,
- "SELECT idimagen FROM imagenes WHERE idcentro=%s",
- params->id);
-
- if (!result) {
- dbi_conn_error(dbi->conn, &msglog);
- syslog(LOG_ERR, "failed to query database (%s:%d) %s\n",
- __func__, __LINE__, msglog);
- og_dbi_close(dbi);
- return -1;
- }
-
- while (dbi_result_next_row(result)) {
- image_id = dbi_result_get_uint(result, "idimagen");
-
- err = og_dbi_delete_image(dbi, image_id);
- if (err < 0) {
- dbi_result_free(result);
- og_dbi_close(dbi);
- return err;
- }
- }
-
- dbi_result_free(result);
- og_dbi_close(dbi);
-
return 0;
}