Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename to health_settings
  • Loading branch information
mtojek committed Nov 23, 2023
commit 8990cb0d432a3cbdff112ea9f069204336bc76eb
2 changes: 1 addition & 1 deletion coderd/database/dbmem/dbmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ func (q *FakeQuerier) GetHealthSettings(_ context.Context) (string, error) {
defer q.mutex.RUnlock()

if q.healthSettings == nil {
return "", sql.ErrNoRows
return "{}", nil
}

return string(q.healthSettings), nil
Expand Down
9 changes: 5 additions & 4 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion coderd/database/queries/siteconfig.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ INSERT INTO site_configs (key, value) VALUES ('oauth_signing_key', $1)
ON CONFLICT (key) DO UPDATE set value = $1 WHERE site_configs.key = 'oauth_signing_key';

-- name: GetHealthSettings :one
SELECT COALESCE(value, '{}') FROM site_configs WHERE key = 'health_settings';
SELECT
COALESCE((SELECT value FROM site_configs WHERE key = 'health_settings'), '{}') :: text AS health_settings
;

-- name: UpsertHealthSettings :exec
INSERT INTO site_configs (key, value) VALUES ('health_settings', $1)
Expand Down