[jsonapi] add param to 'api/update?path=....' endpoint to allow client request for path specific scans

This commit is contained in:
whatdoineed2do/Ray
2021-01-23 15:19:27 +00:00
parent 42af092df5
commit f76003ca9e

View File

@@ -1230,10 +1230,16 @@ static int
jsonapi_reply_update(struct httpd_request *hreq)
{
const char *param;
const char *param_path;
param = httpd_query_value_find(hreq->query, "scan_kind");
param_path = httpd_query_value_find(hreq->query, "path");
if (param_path)
library_rescan_path(param_path);
else
library_rescan(db_scan_kind_enum(param));
library_rescan(db_scan_kind_enum(param));
return HTTP_NOCONTENT;
}