(create dto.AlertLogCreate, alertLog *model.AlertLog)
| 129 | } |
| 130 | |
| 131 | func SaveAlertLog(create dto.AlertLogCreate, alertLog *model.AlertLog) error { |
| 132 | alertRepo := repo.NewIAlertRepo() |
| 133 | if err := copier.Copy(&alertLog, &create); err != nil { |
| 134 | return buserr.WithErr("ErrStructTransform", err) |
| 135 | } |
| 136 | |
| 137 | if err := alertRepo.CreateLog(alertLog); err != nil { |
| 138 | global.LOG.Errorf("Error creating alert logs, err: %v", err) |
| 139 | return err |
| 140 | } |
| 141 | |
| 142 | return nil |
| 143 | } |
| 144 | |
| 145 | func CreateNewAlertTask(quota, alertType, quotaType, method string) { |
| 146 | alertRepo := repo.NewIAlertRepo() |
no test coverage detected