Add OpenAPI docs, frontend, migrations, and API updates
- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability) - OpenAPI: CalendarSubscription schema, Subscriptions tag - Frontend app - Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings - Config, rate limit, auth, calendar, booking, ICS, availability, user service updates Made-with: Cursor
This commit is contained in:
@@ -41,14 +41,34 @@ func (h *UserHandler) UpdateMe(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
var req struct {
|
||||
Timezone *string `json:"timezone"`
|
||||
Timezone *string `json:"timezone"`
|
||||
WeekStartDay *int `json:"week_start_day"`
|
||||
DateFormat *string `json:"date_format"`
|
||||
TimeFormat *string `json:"time_format"`
|
||||
DefaultEventDurationMinutes *int `json:"default_event_duration_minutes"`
|
||||
DefaultReminderMinutes *int `json:"default_reminder_minutes"`
|
||||
ShowWeekends *bool `json:"show_weekends"`
|
||||
WorkingHoursStart *string `json:"working_hours_start"`
|
||||
WorkingHoursEnd *string `json:"working_hours_end"`
|
||||
NotificationsEmail *bool `json:"notifications_email"`
|
||||
}
|
||||
if err := utils.DecodeJSON(r, &req); err != nil {
|
||||
utils.WriteError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
user, err := h.userSvc.Update(r.Context(), userID, req.Timezone)
|
||||
user, err := h.userSvc.Update(r.Context(), userID, &service.UserUpdateInput{
|
||||
Timezone: req.Timezone,
|
||||
WeekStartDay: req.WeekStartDay,
|
||||
DateFormat: req.DateFormat,
|
||||
TimeFormat: req.TimeFormat,
|
||||
DefaultEventDurationMinutes: req.DefaultEventDurationMinutes,
|
||||
DefaultReminderMinutes: req.DefaultReminderMinutes,
|
||||
ShowWeekends: req.ShowWeekends,
|
||||
WorkingHoursStart: req.WorkingHoursStart,
|
||||
WorkingHoursEnd: req.WorkingHoursEnd,
|
||||
NotificationsEmail: req.NotificationsEmail,
|
||||
})
|
||||
if err != nil {
|
||||
utils.WriteError(w, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user