UpdateResolved marks alert as resolved.
(ctx context.Context, id string, userID *string)
| 275 | |
| 276 | // UpdateResolved marks alert as resolved. |
| 277 | func (s *AlertsStore) UpdateResolved(ctx context.Context, id string, userID *string) error { |
| 278 | d := s.db.DB(ctx) |
| 279 | now := time.Now() |
| 280 | return d.Queries.UpdateAlertResolved(ctx, db.UpdateAlertResolvedParams{ |
| 281 | ID: id, |
| 282 | IsActive: false, |
| 283 | ResolvedAt: pgtime.From(now), |
| 284 | ResolvedByUserID: userID, |
| 285 | }) |
| 286 | } |
| 287 | |
| 288 | // UpdateUnresolve marks alert as active again. |
| 289 | func (s *AlertsStore) UpdateUnresolve(ctx context.Context, id string) error { |
no test coverage detected