graph2: Added post mutations. general: Did some cleaning.
the build failed

This commit is contained in:
2018-09-29 15:54:22 +02:00
parent 815f30597e
commit bb28795cd5
14 changed files with 287 additions and 364 deletions
-12
View File
@@ -11,7 +11,6 @@ import (
"git.aiterp.net/rpdata/api/internal/auth"
"git.aiterp.net/rpdata/api/internal/loader"
"git.aiterp.net/rpdata/api/internal/store"
logModel "git.aiterp.net/rpdata/api/model/log"
"github.com/99designs/gqlgen/handler"
)
@@ -24,8 +23,6 @@ func main() {
http.Handle("/", handler.Playground("RPData API", "/graphql"))
http.Handle("/graphql", queryHandler())
go updateCharacters()
log.Fatal(http.ListenAndServe(":8081", nil))
}
@@ -50,12 +47,3 @@ func queryHandler() http.HandlerFunc {
handler.ServeHTTP(w, r)
}
}
func updateCharacters() {
n, err := logModel.UpdateAllCharacters()
if err != nil {
log.Println("Charcter updated stopped:", err)
}
log.Println("Updated characters on", n, "logs")
}