diff --git a/src/cmd/main.go b/src/cmd/main.go index d70cec9..fb535c5 100644 --- a/src/cmd/main.go +++ b/src/cmd/main.go @@ -62,7 +62,7 @@ func RBLLookupIP(c *gin.Context) { listed = "listed" if err == nil { - c.JSON(http.StatusOK, gin.H{"status": listed, "query": q}) + c.JSON(http.StatusOK, gin.H{"status": listed, "listed": true, "query": q}) return } @@ -90,7 +90,7 @@ func RBLLookupIP(c *gin.Context) { listed = "not listed" } - c.JSON(http.StatusOK, gin.H{"status": listed, "query": q}) + c.JSON(http.StatusOK, gin.H{"status": listed, "listed": !dnsErr.IsNotFound, "query": q}) } func initResolver() {