parent
88c3ef5992
commit
82c4ac9c01
|
@ -70,10 +70,10 @@ func updateToken(ge *pb.Event) bool {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
log.Println("updateToken() response Status:", resp.Status)
|
|
||||||
log.Println("updateToken() response Headers:", resp.Header)
|
|
||||||
body, _ := ioutil.ReadAll(resp.Body)
|
body, _ := ioutil.ReadAll(resp.Body)
|
||||||
log.Println("updateToken() response Body:", string(body))
|
log.Println("updateToken() response Body:", string(body))
|
||||||
|
log.Println("updateToken() response Status:", resp.Status)
|
||||||
|
log.Println("updateToken() response Headers:", resp.Header)
|
||||||
|
|
||||||
json := string(body)
|
json := string(body)
|
||||||
jwt := gjson.Get(json, "jwt")
|
jwt := gjson.Get(json, "jwt")
|
||||||
|
|
|
@ -168,20 +168,14 @@ func eventHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Printf("\teventHandler()recv binary: %s", pdata)
|
log.Printf("\teventHandler()recv binary: %s", pdata)
|
||||||
if pdata.Type == pb.Event_GET {
|
if pdata.Type == pb.Event_GET {
|
||||||
e = processGetEvent(pdata)
|
e = processGetEvent(pdata)
|
||||||
e.Comment = "\teventHandler() GOT Event_GET"
|
} else if pdata.Type == pb.Event_MIGRATE {
|
||||||
}
|
|
||||||
if pdata.Type == pb.Event_MIGRATE {
|
|
||||||
e = processGetEvent(pdata)
|
e = processGetEvent(pdata)
|
||||||
e.Comment = "\teventHandler() GOT Event_MIGRATE"
|
} else if pdata.Type == pb.Event_LOGIN {
|
||||||
}
|
|
||||||
if pdata.Type == pb.Event_LOGIN {
|
|
||||||
e = processLoginEvent(pdata)
|
e = processLoginEvent(pdata)
|
||||||
e.Comment = "\teventHandler() GOT Event_LOGIN"
|
} else if pdata.Type == pb.Event_ADD {
|
||||||
}
|
|
||||||
if pdata.Type == pb.Event_ADD {
|
|
||||||
e = processAddEvent(pdata)
|
e = processAddEvent(pdata)
|
||||||
e.Comment = "\teventHandler() GOT Event_ADD"
|
|
||||||
}
|
}
|
||||||
|
e.Comment = "eventHandler() GOT Event_" + pdata.Type.String()
|
||||||
log.Println("\t", e.Comment)
|
log.Println("\t", e.Comment)
|
||||||
sendProtobuf(conn, e)
|
sendProtobuf(conn, e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue