fix: tests + version

- Update code as per go 1.19.3
- Fix tests for unused vars
This commit is contained in:
Lakhan Samani
2022-11-27 20:40:45 +05:30
parent a366b2811d
commit 91d17a9b1f
31 changed files with 542 additions and 97 deletions

View File

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