mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: include organization name when fetching templates (#13751)
* chore: include organization name when fetching templates * chore: rename template_with_user to template_with_names
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
template_with_users
|
||||
template_with_names
|
||||
WHERE
|
||||
id = $1
|
||||
LIMIT
|
||||
@@ -12,7 +12,7 @@ LIMIT
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
template_with_users AS templates
|
||||
template_with_names AS templates
|
||||
WHERE
|
||||
-- Optionally include deleted templates
|
||||
templates.deleted = @deleted
|
||||
@@ -54,7 +54,7 @@ ORDER BY (name, id) ASC
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
template_with_users AS templates
|
||||
template_with_names AS templates
|
||||
WHERE
|
||||
organization_id = @organization_id
|
||||
AND deleted = @deleted
|
||||
@@ -63,7 +63,7 @@ LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetTemplates :many
|
||||
SELECT * FROM template_with_users AS templates
|
||||
SELECT * FROM template_with_names AS templates
|
||||
ORDER BY (name, id) ASC
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user