login works again

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-24 15:35:57 -07:00
parent 80ae926c10
commit 86aee5482c
1 changed files with 7 additions and 3 deletions

10
main.go
View File

@ -10,6 +10,7 @@ import "runtime/debug"
import "github.com/gookit/config"
import "github.com/gobuffalo/packr"
import "github.com/davecgh/go-spew/spew"
// will try to get this hosts FQDN
import "github.com/Showmax/go-fqdn"
@ -23,8 +24,6 @@ var GITCOMMIT string // this is passed in as an ldflag
var GOVERSION string // this is passed in as an ldflag
var BUILDTIME string // this is passed in as an ldflag
// import "github.com/davecgh/go-spew/spew"
// reminder to use this for JSON
// https://github.com/tidwall/gjson
// value := gjson.Get(json, "name.last")
@ -331,12 +330,17 @@ func watchGUI() {
log.Println("\tTRIGGERING CREATE HERE")
event := pb.MakeAddVmEvent()
//event.Username = config.String("accounts." + gui.Data.AccNick + ".username")
event.Username = config.String("accounts." + gui.Data.AccNick + ".username")
event.Email = config.String("accounts." + gui.Data.AccNick + ".email")
//event.Password = config.String("accounts." + gui.Data.AccNick + ".password")
event.Token = config.String("accounts." + gui.Data.AccNick + ".token")
log.Println("\tTRIGGERING LOGIN HERE with event.Token =", event.Token)
spew.Dump(event)
gorillaSendProtobuf(event)
log.Println("\tEVENT SENT TO GORILLA WEBSOCKET")
gui.Data.State = "READ PROTOBUF"
}
if (gui.Data.State == "kill") {