forked from wrenn/wrenn
Added basic frontend (#1)
Reviewed-on: wrenn/sandbox#1 Co-authored-by: pptx704 <rafeed@omukk.dev> Co-committed-by: pptx704 <rafeed@omukk.dev>
This commit is contained in:
@ -9,6 +9,14 @@ SELECT * FROM team_api_keys WHERE key_hash = $1;
|
||||
-- name: ListAPIKeysByTeam :many
|
||||
SELECT * FROM team_api_keys WHERE team_id = $1 ORDER BY created_at DESC;
|
||||
|
||||
-- name: ListAPIKeysByTeamWithCreator :many
|
||||
SELECT k.id, k.team_id, k.name, k.key_hash, k.key_prefix, k.created_by, k.created_at, k.last_used,
|
||||
u.email AS creator_email
|
||||
FROM team_api_keys k
|
||||
JOIN users u ON u.id = k.created_by
|
||||
WHERE k.team_id = $1
|
||||
ORDER BY k.created_at DESC;
|
||||
|
||||
-- name: DeleteAPIKey :exec
|
||||
DELETE FROM team_api_keys WHERE id = $1 AND team_id = $2;
|
||||
|
||||
|
||||
@ -13,7 +13,9 @@ SELECT * FROM sandboxes WHERE id = $1 AND team_id = $2;
|
||||
SELECT * FROM sandboxes ORDER BY created_at DESC;
|
||||
|
||||
-- name: ListSandboxesByTeam :many
|
||||
SELECT * FROM sandboxes WHERE team_id = $1 ORDER BY created_at DESC;
|
||||
SELECT * FROM sandboxes
|
||||
WHERE team_id = $1 AND status NOT IN ('stopped', 'error')
|
||||
ORDER BY created_at DESC;
|
||||
|
||||
-- name: ListSandboxesByHostAndStatus :many
|
||||
SELECT * FROM sandboxes
|
||||
|
||||
Reference in New Issue
Block a user