add revoke client approval

This commit is contained in:
2025-02-13 13:00:21 -06:00
parent 32facb1767
commit 9bfc591fcc
4 changed files with 25 additions and 1 deletions

View File

@@ -783,6 +783,21 @@ func (q *Queries) RenewUser(ctx context.Context, arg RenewUserParams) error {
return err
}
const revokeClientApproval = `-- name: RevokeClientApproval :exec
DELETE FROM client_approvals
WHERE user_id = ? AND client_id = ?
`
type RevokeClientApprovalParams struct {
UserID string
ClientID string
}
func (q *Queries) RevokeClientApproval(ctx context.Context, arg RevokeClientApprovalParams) error {
_, err := q.db.ExecContext(ctx, revokeClientApproval, arg.UserID, arg.ClientID)
return err
}
const updateUser = `-- name: UpdateUser :exec
UPDATE user
SET renew = ?