Let admins edit event date and time

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 17:21:01 -04:00
parent 1f0effb902
commit 891b49b4c0
6 changed files with 78 additions and 0 deletions
+3
View File
@@ -18,6 +18,9 @@ UPDATE events SET title = ?, date = ?, time = ?, location = ? WHERE id = ?;
-- name: UpdateEventLocation :exec
UPDATE events SET location = ? WHERE id = ?;
-- name: UpdateEventDateTime :exec
UPDATE events SET date = ?, time = ? WHERE id = ?;
-- name: DeleteEvent :exec
DELETE FROM events WHERE id = ?;
+15
View File
@@ -767,6 +767,21 @@ func (q *Queries) UpdateEvent(ctx context.Context, arg UpdateEventParams) error
return err
}
const updateEventDateTime = `-- name: UpdateEventDateTime :exec
UPDATE events SET date = ?, time = ? WHERE id = ?
`
type UpdateEventDateTimeParams struct {
Date string
Time string
ID int64
}
func (q *Queries) UpdateEventDateTime(ctx context.Context, arg UpdateEventDateTimeParams) error {
_, err := q.db.ExecContext(ctx, updateEventDateTime, arg.Date, arg.Time, arg.ID)
return err
}
const updateEventDescription = `-- name: UpdateEventDescription :exec
UPDATE events SET description = ? WHERE id = ?
`