SQL: GetAppList missing perms

This commit is contained in:
Melon 2024-05-18 01:48:18 +01:00
parent 5a455b78ac
commit 65e495c29f
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import (
) )
const getAppList = `-- name: GetAppList :many const getAppList = `-- name: GetAppList :many
SELECT subject, name, domain, owner, public, sso, active SELECT subject, name, domain, owner, perms, public, sso, active
FROM client_store FROM client_store
WHERE owner = ? WHERE owner = ?
OR ? = 1 OR ? = 1
@ -28,6 +28,7 @@ type GetAppListRow struct {
Name string `json:"name"` Name string `json:"name"`
Domain string `json:"domain"` Domain string `json:"domain"`
Owner string `json:"owner"` Owner string `json:"owner"`
Perms string `json:"perms"`
Public bool `json:"public"` Public bool `json:"public"`
Sso bool `json:"sso"` Sso bool `json:"sso"`
Active bool `json:"active"` Active bool `json:"active"`
@ -47,6 +48,7 @@ func (q *Queries) GetAppList(ctx context.Context, arg GetAppListParams) ([]GetAp
&i.Name, &i.Name,
&i.Domain, &i.Domain,
&i.Owner, &i.Owner,
&i.Perms,
&i.Public, &i.Public,
&i.Sso, &i.Sso,
&i.Active, &i.Active,

View File

@ -5,7 +5,7 @@ WHERE subject = ?
LIMIT 1; LIMIT 1;
-- name: GetAppList :many -- name: GetAppList :many
SELECT subject, name, domain, owner, public, sso, active SELECT subject, name, domain, owner, perms, public, sso, active
FROM client_store FROM client_store
WHERE owner = ? WHERE owner = ?
OR ? = 1 OR ? = 1