mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
fix: send test email to the user that has requested it
This commit is contained in:
@@ -44,9 +44,9 @@ func NewEmailService(appConfigService *AppConfigService, db *gorm.DB) (*EmailSer
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (srv *EmailService) SendTestEmail() error {
|
||||
func (srv *EmailService) SendTestEmail(recipientUserId string) error {
|
||||
var user model.User
|
||||
if err := srv.db.First(&user).Error; err != nil {
|
||||
if err := srv.db.First(&user, "id = ?", recipientUserId).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user