Add markdown event descriptions for hosts to provide context
Hosts can now add a free-form description (with markdown rendering via goldmark) when creating or editing events. Descriptions render safely with no raw HTML passthrough. Includes ALTER TABLE migration for existing databases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,6 +104,7 @@ func main() {
|
||||
if _, err := database.Exec(schemaSQL); err != nil {
|
||||
log.Fatal("schema init: ", err)
|
||||
}
|
||||
runMigrations(database)
|
||||
|
||||
funcMap := template.FuncMap{
|
||||
"pct": func(count, max int64) int64 {
|
||||
@@ -160,6 +161,7 @@ func main() {
|
||||
|
||||
// Admin
|
||||
r.Get("/e/{slug}/admin/{token}", srv.handleAdmin)
|
||||
r.Post("/e/{slug}/admin/{token}/description", srv.handleUpdateDescription)
|
||||
r.Post("/e/{slug}/admin/{token}/slot", srv.handleCreateSlot)
|
||||
r.Delete("/e/{slug}/admin/{token}/slot/{slotID}", srv.handleDeleteSlot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user