fix: tests + version
- Update code as per go 1.19.3 - Fix tests for unused vars
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/graph/model"
|
||||
@@ -35,3 +36,10 @@ func (e *EmailTemplate) AsAPIEmailTemplate() *model.EmailTemplate {
|
||||
UpdatedAt: refs.NewInt64Ref(e.UpdatedAt),
|
||||
}
|
||||
}
|
||||
|
||||
func (e *EmailTemplate) ToMap() map[string]interface{} {
|
||||
res := map[string]interface{}{}
|
||||
data, _ := json.Marshal(e) // Convert to a json string
|
||||
json.Unmarshal(data, &res) // Convert to a map
|
||||
return res
|
||||
}
|
||||
|
Reference in New Issue
Block a user