feat: send email based on template
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/graph/model"
|
||||
@@ -64,3 +65,10 @@ func (user *User) AsAPIUser() *model.User {
|
||||
UpdatedAt: refs.NewInt64Ref(user.UpdatedAt),
|
||||
}
|
||||
}
|
||||
|
||||
func (user *User) ToMap() map[string]interface{} {
|
||||
res := map[string]interface{}{}
|
||||
data, _ := json.Marshal(user) // Convert to a json string
|
||||
json.Unmarshal(data, &res) // Convert to a map
|
||||
return res
|
||||
}
|
||||
|
Reference in New Issue
Block a user