webhooks and chirps by user id
This commit is contained in:
22
internal/database/UpgradeUserToChirpyRed.sql.go
Normal file
22
internal/database/UpgradeUserToChirpyRed.sql.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: UpgradeUserToChirpyRed.sql
|
||||
|
||||
package database
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const upgradeUserToChirpyRed = `-- name: UpgradeUserToChirpyRed :exec
|
||||
UPDATE users SET is_chirpy_red = true WHERE id = $1
|
||||
RETURNING id, created_at, updated_at, email, hashed_password, is_chirpy_red
|
||||
`
|
||||
|
||||
func (q *Queries) UpgradeUserToChirpyRed(ctx context.Context, id uuid.UUID) error {
|
||||
_, err := q.db.ExecContext(ctx, upgradeUserToChirpyRed, id)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user