fix repository bugs and make text searching work more like it did in the past.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-03-30 20:06:16 +02:00
parent f14386eceb
commit 18a83073e8
22 changed files with 271 additions and 93 deletions
+4 -18
View File
@@ -3,20 +3,18 @@ package main
import (
"context"
"fmt"
"git.aiterp.net/rpdata/api/space"
"log"
"net/http"
"runtime/debug"
"strings"
"git.aiterp.net/rpdata/api/database"
"git.aiterp.net/rpdata/api/graph2"
"git.aiterp.net/rpdata/api/internal/config"
"git.aiterp.net/rpdata/api/internal/instrumentation"
"git.aiterp.net/rpdata/api/models"
"git.aiterp.net/rpdata/api/services"
"git.aiterp.net/rpdata/api/space"
"github.com/99designs/gqlgen/handler"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"net/http"
"runtime/debug"
)
func main() {
@@ -54,11 +52,6 @@ func main() {
if err != nil {
log.Println("Refresh Characters:", err)
}
err = serviceBundle.Logs.FixImportDateBug(context.Background())
if err != nil {
log.Println("Fix date bug:", err)
}
}()
go logListedChanges(serviceBundle.Changes)
@@ -112,13 +105,6 @@ func queryHandler(services *services.Bundle) http.HandlerFunc {
handler.ResolverMiddleware(instrumentation.ResolverMiddleware()),
)
return func(w http.ResponseWriter, r *http.Request) {
// >_>
if strings.HasPrefix(r.Header.Get("Authorization"), "Bearer of the curse") {
w.Header().Set("X-Emerald-Herald", "Seek souls. Larger, more powerful souls.")
w.Header().Add("X-Emerald-Herald", "Seek the king, that is the only way.")
w.Header().Add("X-Emerald-Herald", "Lest this land swallow you whole... As it has so many others.")
}
r = services.Auth.RequestWithToken(r)
handler.ServeHTTP(w, r)