File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -31,21 +31,15 @@ func (t *TempApplication) CreateTempApplication(gCtx *gin.Context) {
3131 }
3232
3333 err := t .service .CreateTempApplication (t .ctx , & req )
34- gCtx .AbortWithStatusJSON (err .Code , err .Message )
3534 if err != nil {
35+ gCtx .AbortWithStatusJSON (err .Code , err .Message )
3636 return
3737 }
3838
3939 smtpClient := gCtx .MustGet ("smtp_client" ).(* mail.SMTPClient )
4040 email := applicationReplyEmail (& req )
4141
42- if email .Error != nil {
43- gCtx .JSON (http .StatusInternalServerError , "Something went wrong when creating the reply email." )
44- }
45-
46- if err := email .Send (smtpClient ); err != nil {
47- gCtx .JSON (http .StatusInternalServerError , "Something went wrong when sending the reply email." )
48- }
42+ email .Send (smtpClient )
4943
5044 gCtx .Status (http .StatusCreated )
5145}
You can’t perform that action at this time.
0 commit comments