chirpy_server/internal/database/update_token.sql.go

24 lines
451 B
Go
Raw Normal View History

2024-10-25 23:31:57 +02:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.27.0
// source: update_token.sql
package database
import (
"context"
)
const revokeRefreshToken = `-- name: RevokeRefreshToken :exec
UPDATE refresh_tokens
SET
revoked_at = NOW(),
updated_at = NOW()
WHERE token = $1
`
func (q *Queries) RevokeRefreshToken(ctx context.Context, token string) error {
_, err := q.db.ExecContext(ctx, revokeRefreshToken, token)
return err
}