diff --git a/api.go b/api.go index 2fb6d4d..44ce65e 100644 --- a/api.go +++ b/api.go @@ -1931,6 +1931,8 @@ func (app *appContext) GetCustomEmails(gc *gin.Context) { func (app *appContext) getCustomEmail(id string) *customEmail { switch id { + case "Announcement": + return &customEmail{} case "UserCreated": return &app.storage.customEmails.UserCreated case "InviteExpiry": @@ -2041,6 +2043,7 @@ func (app *appContext) GetCustomEmailTemplate(gc *gin.Context) { emailAddress := app.storage.lang.Email[lang].Strings.get("emailAddress") email := app.getCustomEmail(id) if email == nil { + app.err.Printf("Failed to get custom email with ID \"%s\"", id) respondBool(400, false, gc) return } diff --git a/go.mod b/go.mod index 0970762..7a4aa99 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 github.com/swaggo/gin-swagger v1.3.2 - github.com/swaggo/swag v1.7.3 // indirect + github.com/swaggo/swag v1.7.4 // indirect github.com/technoweenie/multipartstreamer v1.0.1 // indirect github.com/tidwall/sjson v1.2.2 // indirect github.com/ugorji/go v1.2.6 // indirect diff --git a/go.sum b/go.sum index fd35cc7..3ac3fdb 100644 --- a/go.sum +++ b/go.sum @@ -243,6 +243,8 @@ github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+t github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= github.com/swaggo/swag v1.7.3 h1:ucB7irEdRrhjmW+Z1Ss4GjO68oPKQFjSgOR8BCAvcbU= github.com/swaggo/swag v1.7.3/go.mod h1:zD8h6h4SPv7t3l+4BKdRquqW1ASWjKZgT6Qv9z3kNqI= +github.com/swaggo/swag v1.7.4 h1:up+ixy8yOqJKiFcuhMgkuYuF4xnevuhnFAXXF8OSfNg= +github.com/swaggo/swag v1.7.4/go.mod h1:zD8h6h4SPv7t3l+4BKdRquqW1ASWjKZgT6Qv9z3kNqI= github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tidwall/gjson v1.6.8/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=