GetFirst returns the first (and typically only) settings row.
(ctx context.Context)
| 23 | |
| 24 | // GetFirst returns the first (and typically only) settings row. |
| 25 | func (s *SettingsStore) GetFirst(ctx context.Context) (*models.Settings, error) { |
| 26 | d := s.db.DB(ctx) |
| 27 | setting, err := d.Queries.GetFirstSettings(ctx) |
| 28 | if err != nil { |
| 29 | return nil, err |
| 30 | } |
| 31 | out := dbSettingToModel(setting) |
| 32 | return &out, nil |
| 33 | } |
| 34 | |
| 35 | // Update updates settings by ID. |
| 36 | func (s *SettingsStore) Update(ctx context.Context, settings *models.Settings) error { |
no test coverage detected