diff --git a/api/main.go b/api/main.go index fe45f49..bec47b2 100644 --- a/api/main.go +++ b/api/main.go @@ -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)