feat: implement system statistics tracking, commit management controllers, and associated database migrations
All checks were successful
Build and Release / release (push) Successful in 1m49s
All checks were successful
Build and Release / release (push) Successful in 1m49s
This commit is contained in:
@@ -8,6 +8,7 @@ const (
|
||||
TaskTypeDeleteMedia TaskType = "DELETE_MEDIA"
|
||||
TaskTypeBulkDeleteMedia TaskType = "BULK_DELETE_MEDIA"
|
||||
TaskTypeRagIndexSubmission TaskType = "RAG_INDEX_SUBMISSION"
|
||||
TaskTypeAdminUserAction TaskType = "ADMIN_USER_ACTION"
|
||||
)
|
||||
|
||||
func (t TaskType) String() string {
|
||||
|
||||
@@ -104,3 +104,23 @@ func SendHistorianReviewMail(dto *models.UserVerificationStorageEntity) error {
|
||||
"APP_URL": feUrl,
|
||||
})
|
||||
}
|
||||
|
||||
func SendAdminUserActionMail(payload *models.AdminUserActionPayload) error {
|
||||
var subject string
|
||||
templatePath := "resources/admin_user_action.html"
|
||||
|
||||
switch payload.Action {
|
||||
case "create":
|
||||
subject = "Your account has been created"
|
||||
case "reset":
|
||||
subject = "Your password has been reset"
|
||||
default:
|
||||
return fmt.Errorf("invalid action: %s", payload.Action)
|
||||
}
|
||||
|
||||
return SendMail(payload.Email, subject, templatePath, map[string]string{
|
||||
"EMAIL": payload.Email,
|
||||
"PASSWORD": payload.Password,
|
||||
"ACTION": payload.Action,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user