implement delete session
This commit is contained in:
@@ -342,6 +342,16 @@ func (q *Queries) DeleteRedirectURI(ctx context.Context, arg DeleteRedirectURIPa
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteSession = `-- name: DeleteSession :exec
|
||||
DELETE FROM sessions
|
||||
WHERE id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteSession(ctx context.Context, id string) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteSession, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const getAuthorizationCode = `-- name: GetAuthorizationCode :one
|
||||
SELECT id, code, code_challenge, code_challenge_method, user_id, client_id, scope, redirect_uri, created_at, expires_at, used_at
|
||||
FROM authorization_codes
|
||||
|
||||
Reference in New Issue
Block a user