Add admin location editing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,9 @@ UPDATE events SET description = ? WHERE id = ?;
|
||||
-- name: UpdateEvent :exec
|
||||
UPDATE events SET title = ?, date = ?, time = ?, location = ? WHERE id = ?;
|
||||
|
||||
-- name: UpdateEventLocation :exec
|
||||
UPDATE events SET location = ? WHERE id = ?;
|
||||
|
||||
-- name: DeleteEvent :exec
|
||||
DELETE FROM events WHERE id = ?;
|
||||
|
||||
|
||||
@@ -719,6 +719,20 @@ func (q *Queries) UpdateEventDescription(ctx context.Context, arg UpdateEventDes
|
||||
return err
|
||||
}
|
||||
|
||||
const updateEventLocation = `-- name: UpdateEventLocation :exec
|
||||
UPDATE events SET location = ? WHERE id = ?
|
||||
`
|
||||
|
||||
type UpdateEventLocationParams struct {
|
||||
Location string
|
||||
ID int64
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateEventLocation(ctx context.Context, arg UpdateEventLocationParams) error {
|
||||
_, err := q.db.ExecContext(ctx, updateEventLocation, arg.Location, arg.ID)
|
||||
return err
|
||||
}
|
||||
|
||||
const updateRsvp = `-- name: UpdateRsvp :exec
|
||||
UPDATE rsvps SET name = ?, note = ?, plus_one = ? WHERE id = ?
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user