1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-03-19 14:17:48 +02:00

added more descriptive test OTP id and failure log message

This commit is contained in:
Gani Georgiev 2024-12-02 13:46:22 +02:00
parent 77ac44a49a
commit 2d828ef9eb
3 changed files with 7 additions and 3 deletions

@ -2,6 +2,10 @@
- Fixed `autodate` fields not refreshing when calling `Save` multiple times on the same `Record` instance ([#6000](https://github.com/pocketbase/pocketbase/issues/6000)).
- Added more descriptive test OTP id and failure log message ([#5982](https://github.com/pocketbase/pocketbase/discussions/5982)).
- Moved the default UI CSP from meta tag to response header ([#5995](https://github.com/pocketbase/pocketbase/discussions/5995)).
## v0.23.3

@ -107,7 +107,7 @@ func (form *TestEmailSend) Submit() error {
case TestTemplateEmailChange:
return mails.SendRecordChangeEmail(form.app, record, form.Email)
case TestTemplateOTP:
return mails.SendRecordOTP(form.app, record, "OTP_ID", "123456")
return mails.SendRecordOTP(form.app, record, "_PB_TEST_OTP_ID_", "123456")
case TestTemplateAuthAlert:
return mails.SendRecordAuthAlert(form.app, record)
default:

@ -89,8 +89,8 @@ func SendRecordOTP(app core.App, authRecord *core.Record, otpId string, pass str
otp, err := e.App.FindOTPById(otpId)
if err != nil {
e.App.Logger().Error(
"Failed to find OTP to update its sentTo field",
e.App.Logger().Warn(
"Unabled to find OTP to update its sentTo field (either it was already deleted or the id is nonexisting)",
"error", err,
"otpId", otpId,
)