listed status as boolean
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
Vulnerability Scan / Daily Vulnerability Scan (push) Successful in 12s

This commit is contained in:
Paolo Asperti 2025-03-24 14:54:52 +01:00
parent 045c1b1904
commit c9f6554952
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -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() {