mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat(coderd): add endpoints for editing and deleting organizations (#13287)
This commit is contained in:
committed by
GitHub
parent
0a86d6d176
commit
3f1e9c038a
@ -53,3 +53,20 @@ INSERT INTO
|
||||
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 *;
|
||||
|
||||
-- name: UpdateOrganization :one
|
||||
UPDATE
|
||||
organizations
|
||||
SET
|
||||
updated_at = @updated_at,
|
||||
name = @name
|
||||
WHERE
|
||||
id = @id
|
||||
RETURNING *;
|
||||
|
||||
-- name: DeleteOrganization :exec
|
||||
DELETE FROM
|
||||
organizations
|
||||
WHERE
|
||||
id = $1 AND
|
||||
is_default = false;
|
||||
|
Reference in New Issue
Block a user