From 3dad54be77b1a2de13bcd8e5edaa64be2346fa13 Mon Sep 17 00:00:00 2001 From: geek Date: Wed, 7 Jun 2017 18:19:02 +0900 Subject: [PATCH] sdf --- proxy/email/email_service.go | 23 +++++++---------------- proxy/service.go | 2 +- 2 files changed, 8 insertions(+), 17 deletions(-) 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)