Add admin location editing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 23:05:17 -04:00
parent 44c20d54ff
commit 3afef25b4c
5 changed files with 47 additions and 0 deletions
+3
View File
@@ -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 = ?;
+14
View File
@@ -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 = ?
`