removed unnecessery struct wrapping

This commit is contained in:
Gani Georgiev
2026-04-05 16:28:11 +03:00
parent 89f3668da2
commit 01949b059b
2 changed files with 3 additions and 8 deletions

View File

@@ -358,7 +358,7 @@ type SMTPConfig struct {
Port int `form:"port" json:"port"`
Host string `form:"host" json:"host"`
Username string `form:"username" json:"username"`
Password string `form:"password" json:"password,omitempty"`
Password string `form:"password" json:"password"`
// SMTP AUTH - PLAIN (default) or LOGIN
AuthMethod string `form:"authMethod" json:"authMethod"`
@@ -413,12 +413,7 @@ func (c SMTPConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v)
}
v := struct {
alias
Password string `json:"password"`
}{alias(c), c.Password}
return json.Marshal(v)
return json.Marshal(alias(c))
}
// -------------------------------------------------------------------