package store import ( "context" "g.fc.run/ai/byre/internal/api" ) func (s *Store) UpdateNotificationPrefs(ctx context.Context, login string, prefs api.NotificationPrefs) (api.User, error) { return s.updateUser(ctx, login, `notify_questions = ?, notify_reports = ?, notify_errors = ?, notify_rate_limits = ?, notify_ready = ?, notify_discard = ?, notify_merge_problems = ?, notify_workflows = ?`, prefs.Questions, prefs.Reports, prefs.Errors, prefs.RateLimits, prefs.Ready, prefs.Discard, prefs.MergeProblems, prefs.Workflows) } func (s *Store) UpdateDefaultModel(ctx context.Context, login, model string) (api.User, error) { return s.updateUser(ctx, login, `default_model = ?`, model) } func (s *Store) UpdateQuickRun(ctx context.Context, login string, q api.QuickRun) (api.User, error) { return s.updateUser(ctx, login, `quick_run_project = nullif(?, ''), quick_run_workflow = ?`, q.ProjectId, q.Workflow) } func (s *Store) UpdateAway(ctx context.Context, login string, away bool) (api.User, error) { return s.updateUser(ctx, login, `away = ?`, away) }