DeactivateConfig deactivates a configuration.
(ctx context.Context, userID string)
| 316 | |
| 317 | // DeactivateConfig deactivates a configuration. |
| 318 | func (d DB) DeactivateConfig(ctx context.Context, userID string) error { |
| 319 | cfg, err := d.GetConfig(ctx, userID) |
| 320 | if err != nil { |
| 321 | return err |
| 322 | } |
| 323 | return d.SetDeletedAtConfig(ctx, userID, sql.NullTime{Time: time.Now(), Valid: true}, cfg.Config) |
| 324 | } |
| 325 | |
| 326 | // RestoreConfig restores configuration. |
| 327 | func (d DB) RestoreConfig(ctx context.Context, userID string) error { |