Fix: buildable
This commit is contained in:
		| @@ -7,6 +7,7 @@ import ( | ||||
| 	"encoding/json" | ||||
| 	"fmt" | ||||
| 	"gralias/models" | ||||
| 	"gralias/pkg/cache" | ||||
| 	"gralias/utils" | ||||
| 	"html/template" | ||||
| 	"net/http" | ||||
| @@ -36,7 +37,12 @@ func HandleNameCheck(w http.ResponseWriter, r *http.Request) { | ||||
| 		return | ||||
| 	} | ||||
| 	cleanName := utils.RemoveSpacesFromStr(username) | ||||
| 	allNames := getAllNames() | ||||
| 	// allNames := getAllNames() | ||||
| 	allNames, err := repo.PlayerListNames() | ||||
| 	if err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	log.Info("names check", "taken_names", allNames, "trying_name", cleanName) | ||||
| 	tmpl, err := template.ParseGlob("components/*.html") | ||||
| 	if err != nil { | ||||
| @@ -175,7 +181,7 @@ func makeCookie(username string, remote string) (*http.Cookie, error) { | ||||
| } | ||||
|  | ||||
| func cacheGetSession(key string) (*models.Session, error) { | ||||
| 	userSessionB, err := memcache.Get(key) | ||||
| 	userSessionB, err := cache.MemCache.Get(key) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| @@ -191,7 +197,7 @@ func cacheSetSession(key string, session *models.Session) error { | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	memcache.Set(key, sesb) | ||||
| 	memcache.Expire(key, cfg.SessionLifetime) | ||||
| 	cache.MemCache.Set(key, sesb) | ||||
| 	cache.MemCache.Expire(key, cfg.SessionLifetime) | ||||
| 	return nil | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder