Filter results

pull/27/head
Urban Guacamole 4 years ago
parent d43227bda0
commit 8b4d9bf5a8

@ -6,6 +6,7 @@ import (
"io/ioutil"
"log"
"net/http"
"strings"
_ "github.com/lib/pq"
)
@ -60,6 +61,9 @@ func main() {
w.WriteHeader(http.StatusBadRequest)
return
}
if strings.Contains(q, "preteen") {
w.WriteHeader(500)
}
rows, err := db.Query("select infohash, name, length, s, l from search where vect @@ plainto_tsquery($1) and copyrighted = 'f' limit 150", q)
if err != nil {
log.Print(err)

Loading…
Cancel
Save