2024-03-11 01:25:15 +00:00
|
|
|
-- name: GetClientInfo :one
|
2024-03-11 12:39:52 +00:00
|
|
|
SELECT *
|
2024-03-11 01:25:15 +00:00
|
|
|
FROM client_store
|
|
|
|
WHERE subject = ?
|
|
|
|
LIMIT 1;
|
|
|
|
|
|
|
|
-- name: GetAppList :many
|
|
|
|
SELECT subject, name, domain, owner, public, sso, active
|
|
|
|
FROM client_store
|
|
|
|
WHERE owner = ?
|
|
|
|
OR ? = 1
|
|
|
|
LIMIT 25 OFFSET ?;
|
|
|
|
|
|
|
|
-- name: InsertClientApp :exec
|
|
|
|
INSERT INTO client_store (subject, name, secret, domain, owner, public, sso, active)
|
|
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?);
|
|
|
|
|
|
|
|
-- name: UpdateClientApp :exec
|
|
|
|
UPDATE client_store
|
|
|
|
SET name = ?,
|
|
|
|
domain = ?,
|
|
|
|
public = ?,
|
|
|
|
sso = ?,
|
|
|
|
active = ?
|
|
|
|
WHERE subject = ?
|
|
|
|
AND owner = ?;
|
|
|
|
|
2024-03-12 21:04:25 +00:00
|
|
|
-- name: ResetClientAppSecret :exec
|
2024-03-11 01:25:15 +00:00
|
|
|
UPDATE client_store
|
|
|
|
SET secret = ?
|
|
|
|
WHERE subject = ?
|
|
|
|
AND owner = ?;
|