Feat: save room even if llm failed to properly guess; fix prompt
This commit is contained in:
@ -79,11 +79,11 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
http.SetCookie(w, cookie)
|
||||
tmpl, err := template.ParseGlob("components/*.html")
|
||||
if err != nil {
|
||||
abortWithError(w, err.Error())
|
||||
return
|
||||
}
|
||||
// tmpl, err := template.ParseGlob("components/*.html")
|
||||
// if err != nil {
|
||||
// abortWithError(w, err.Error())
|
||||
// return
|
||||
// }
|
||||
// check if that user was already in db
|
||||
userstate, err := loadState(cleanName)
|
||||
if err != nil || userstate == nil {
|
||||
@ -120,9 +120,10 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if err := tmpl.ExecuteTemplate(w, "base", fi); err != nil {
|
||||
log.Error("failed to execute base template", "error", err)
|
||||
}
|
||||
// if err := tmpl.ExecuteTemplate(w, "base", fi); err != nil {
|
||||
// log.Error("failed to execute base template", "error", err)
|
||||
// }
|
||||
http.Redirect(w, r, "/", 302)
|
||||
}
|
||||
|
||||
func makeCookie(username string, remote string) (*http.Cookie, error) {
|
||||
|
Reference in New Issue
Block a user