Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Panic instead of fatal err (#5178)

Neerajc2833d11b039
diff --git a/server/pkg/controller/user/userauth.go b/server/pkg/controller/user/userauth.go
index e7934b8c6a..8d66023e98 100644
--- a/server/pkg/controller/user/userauth.go
+++ b/server/pkg/controller/user/userauth.go
@@ -346,7 +346,7 @@ func (c *UserController) AddTokenAndNotify(userID int64, app ente.App, token str
return
}
emailSendErr := emailUtil.SendTemplatedEmail([]string{user.Email}, "Ente", "[email protected]", emailCtrl.LoginSuccessSubject, emailCtrl.LoginSuccessTemplate, map[string]interface{}{
- "Date": t.Now().UTC().Format("02 Jan, 2006 15:04"),
+ "Date": t.Now().UTC().Format("02 Jan, 2006 15:04"),
}, nil)
if emailSendErr != nil {
log.WithError(emailSendErr).Error("Failed to send email")
@@ -479,7 +479,7 @@ func (c *UserController) onVerificationSuccess(context *gin.Context, email strin
func convertStringToBytes(s string) []byte {
b, err := base64.StdEncoding.DecodeString(s)
if err != nil {
- log.Fatal(err)
+ panic(fmt.Sprintf("failed to base64dDecode string %s", s))
}
return b
}