listed status as boolean
This commit is contained in:
parent
045c1b1904
commit
c9f6554952
@ -62,7 +62,7 @@ func RBLLookupIP(c *gin.Context) {
|
|||||||
|
|
||||||
listed = "listed"
|
listed = "listed"
|
||||||
if err == nil {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ func RBLLookupIP(c *gin.Context) {
|
|||||||
listed = "not listed"
|
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() {
|
func initResolver() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user