feat: edit org display names and descriptions (#13474)

This commit is contained in:
Kayla Washburn-Love
2024-06-06 10:59:59 -06:00
committed by GitHub
parent 1131772e79
commit 44a70a5bc2
22 changed files with 359 additions and 90 deletions

View File

@ -49,17 +49,19 @@ WHERE
-- name: InsertOrganization :one
INSERT INTO
organizations (id, "name", description, created_at, updated_at, is_default)
organizations (id, "name", display_name, description, created_at, updated_at, is_default)
VALUES
-- If no organizations exist, and this is the first, make it the default.
($1, $2, $3, $4, $5, (SELECT TRUE FROM organizations LIMIT 1) IS NULL) RETURNING *;
(@id, @name, @display_name, @description, @created_at, @updated_at, (SELECT TRUE FROM organizations LIMIT 1) IS NULL) RETURNING *;
-- name: UpdateOrganization :one
UPDATE
organizations
SET
updated_at = @updated_at,
name = @name
name = @name,
display_name = @display_name,
description = @description
WHERE
id = @id
RETURNING *;