add revoke client approval
This commit is contained in:
@@ -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 = ?
|
||||
|
||||
Reference in New Issue
Block a user