Manage custom.list through the universal /config/dns/hosts instead of its own interface. This reduces code duplication.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-01-20 18:32:21 +01:00
parent 91f04fd053
commit 88e57ef9e3
17 changed files with 215 additions and 483 deletions
-2
View File
@@ -36,8 +36,6 @@ static struct {
// appear *before* less specific URIs: 1. "/a/b/c", 2. "/a/b", 3. "/a"
{ "/api/dns/blocking", "", api_dns_blocking, { false, 0 }, true, HTTP_GET | HTTP_POST },
{ "/api/dns/cache", "", api_dns_cache, { false, 0 }, true, HTTP_GET },
{ "/api/dns/entries", "", api_dns_entries, { false, 0 }, true, HTTP_GET },
{ "/api/dns/entries", "/{ip}/{host}", api_dns_entries, { false, 0 }, true, HTTP_PUT | HTTP_DELETE },
{ "/api/clients", "/{client}", api_list, { false, 0 }, true, HTTP_GET | HTTP_POST | HTTP_PUT | HTTP_DELETE },
{ "/api/domains", "/{type}/{kind}/{domain}", api_list, { false, 0 }, true, HTTP_GET | HTTP_POST | HTTP_PUT | HTTP_DELETE },
{ "/api/groups", "/{name}", api_list, { false, 0 }, true, HTTP_GET | HTTP_POST | HTTP_PUT | HTTP_DELETE },