sdf
This commit is contained in:
parent
88773a6a68
commit
3dad54be77
@ -155,22 +155,6 @@ func (es *EmailService)SendEmailForAuth(e *Email) (error){
|
|||||||
return err
|
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 {
|
func (es *EmailService) getEmailMap(e *Email) map[string]string {
|
||||||
|
|
||||||
emMap := make(map[string]string)
|
emMap := make(map[string]string)
|
||||||
@ -186,6 +170,13 @@ func (es *EmailService) getEmailMap(e *Email) map[string]string {
|
|||||||
return emMap
|
return emMap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (es *EmailService) saveEmail(e *Email) {
|
||||||
|
|
||||||
|
memMap := es.getEmailMap(e)
|
||||||
|
proxy.InvokeDB("emailAuth", "create", memMap)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (es *EmailService) CheckAuthURL(e *Email) bool {
|
func (es *EmailService) CheckAuthURL(e *Email) bool {
|
||||||
|
|
||||||
//Todo Query from the database with an authentication token.
|
//Todo Query from the database with an authentication token.
|
||||||
|
@ -15,7 +15,7 @@ func InvokeDB(targetDb, methodName string, param map[string]string) (string) {
|
|||||||
in.Method = methodName
|
in.Method = methodName
|
||||||
in.Param = param
|
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 {
|
if err != nil {
|
||||||
log.Fatal("Rpc Error: ", err)
|
log.Fatal("Rpc Error: ", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user