diff --git a/proxy/email/email_service.go b/proxy/email/email_service.go index f73237f..a8250ba 100644 --- a/proxy/email/email_service.go +++ b/proxy/email/email_service.go @@ -155,22 +155,6 @@ func (es *EmailService)SendEmailForAuth(e *Email) (error){ return err } -func (es *EmailService) saveEmail(e *Email) { - - memMap := make(map[string]string) - - str, err := json.Marshal(e) - - fmt.Println(string(str)) - if err != nil { - log.Fatal("Json Marshal Error: ", err) - } - - memMap["com.loafle.overflow.email.model.EmailAuth"] = string(str) - proxy.InvokeDB("emailAuth", "create", memMap) - -} - func (es *EmailService) getEmailMap(e *Email) map[string]string { emMap := make(map[string]string) @@ -186,6 +170,13 @@ func (es *EmailService) getEmailMap(e *Email) map[string]string { return emMap } +func (es *EmailService) saveEmail(e *Email) { + + memMap := es.getEmailMap(e) + proxy.InvokeDB("emailAuth", "create", memMap) + +} + func (es *EmailService) CheckAuthURL(e *Email) bool { //Todo Query from the database with an authentication token. diff --git a/proxy/service.go b/proxy/service.go index 6f0ac8e..e798998 100644 --- a/proxy/service.go +++ b/proxy/service.go @@ -15,7 +15,7 @@ func InvokeDB(targetDb, methodName string, param map[string]string) (string) { in.Method = methodName in.Param = param - conn, err := grpc.Dial("192.168.1.209:50006", grpc.WithInsecure()) + conn, err := grpc.Dial("192.168.1.103:50006", grpc.WithInsecure()) if err != nil { log.Fatal("Rpc Error: ", err)