This commit is contained in:
geek 2017-06-07 18:19:02 +09:00
parent 88773a6a68
commit 3dad54be77
2 changed files with 8 additions and 17 deletions

View File

@ -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.

View File

@ -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)