Ensure both type and enabled are returned when requesting domains through the API

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2023-05-06 20:08:07 +02:00
parent 7281da34b4
commit 7f0bd7481e
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
2 changed files with 2 additions and 2 deletions

View File

@ -503,7 +503,7 @@ int api_list(struct ftl_conn *api)
return send_json_error(api, 400,
"uri_error",
"Invalid request: Specify list to modify more precisely",
NULL);
api->request->local_uri_raw);
}
else
{

View File

@ -2074,7 +2074,7 @@ bool gravityDB_readTable(const enum gravity_list_type listtype,
filter = " AND domain LIKE :item";
}
snprintf(querystr, buflen, "SELECT id,domain,date_added,date_modified,comment,"
snprintf(querystr, buflen, "SELECT id,domain,type,enabled,date_added,date_modified,comment,"
"(SELECT GROUP_CONCAT(group_id) FROM domainlist_by_group g WHERE g.domainlist_id = d.id) AS group_ids "
"FROM domainlist d WHERE d.type IN (%s)%s;", type, filter);