groupware: move POST+DELETE of contacts and events as a top-level route underneath accounts

This commit is contained in:
Pascal Bleser
2025-10-31 17:19:57 +01:00
parent 4c1b887f65
commit dce5b16936

View File

@@ -144,10 +144,10 @@ func (g *Groupware) Route(r chi.Router) {
r.Get("/", g.GetAddressbook)
r.Get("/contacts", g.GetContactsInAddressbook)
})
r.Route("/contacts", func(r chi.Router) {
r.Post("/", g.CreateContact)
r.Delete("/{contactid}", g.DeleteContact)
})
})
r.Route("/contacts", func(r chi.Router) {
r.Post("/", g.CreateContact)
r.Delete("/{contactid}", g.DeleteContact)
})
r.Route("/calendars", func(r chi.Router) {
r.Get("/", g.GetCalendars)
@@ -155,10 +155,10 @@ func (g *Groupware) Route(r chi.Router) {
r.Get("/", g.GetCalendarById)
r.Get("/events", g.GetEventsInCalendar)
})
r.Route("/events", func(r chi.Router) {
r.Post("/", g.CreateCalendarEvent)
r.Delete("/{eventid}", g.DeleteCalendarEvent)
})
})
r.Route("/events", func(r chi.Router) {
r.Post("/", g.CreateCalendarEvent)
r.Delete("/{eventid}", g.DeleteCalendarEvent)
})
r.Route("/tasklists", func(r chi.Router) {
r.Get("/", g.GetTaskLists)