aboutsummaryrefslogtreecommitdiff
path: root/cmd/resolver/resolver.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-05-23 02:27:30 +0700
committerShulhan <ms@kilabit.info>2022-06-09 23:39:01 +0700
commit03ae9f6bfde5262b44d2318cc1162c20d867a3f6 (patch)
tree92e805bcd533bc1e2fa21c151b78a00a0b1526b5 /cmd/resolver/resolver.go
parentfdb3c4462417dd1caeb28d263c1f3be6e453f6bb (diff)
downloadrescached-03ae9f6bfde5262b44d2318cc1162c20d867a3f6.tar.xz
all: change the HTTP API to update hosts in block.d
We have HTTP API to enable or disable block.d by batch by passing all block.d records. The name of HTTP API is /v2/block.d/update and this is duplicate with API to update the content of hosts in block.d. This changes fix this by creating new HTTP API /v2/block.d/fetch that fetch the latest hosts file from specific block.d by its name. While at it, - reformat html and JavaScript files using js-beautify - rename constants and methods for HTTP APIs - add and update comments for some HTTP APIs
Diffstat (limited to 'cmd/resolver/resolver.go')
-rw-r--r--cmd/resolver/resolver.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/resolver/resolver.go b/cmd/resolver/resolver.go
index 9cad5be..ad586e2 100644
--- a/cmd/resolver/resolver.go
+++ b/cmd/resolver/resolver.go
@@ -117,7 +117,7 @@ func (rsol *resolver) doCmdBlockd(args []string) {
log.Fatalf("resolver: %s %s: missing argument", rsol.cmd, subCmd)
}
- blockd, err = resc.BlockdUpdate(args[0])
+ blockd, err = resc.BlockdFetch(args[0])
if err != nil {
log.Fatalf("resolver: %s %s: %s", rsol.cmd, subCmd, err)
}