feat: add quiet hours settings page (#9676)

This commit is contained in:
Kayla Washburn
2023-09-15 11:14:33 -06:00
committed by GitHub
parent 72dff7f188
commit efe804498b
22 changed files with 613 additions and 86 deletions

View File

@ -68,7 +68,7 @@ func (api *API) userQuietHoursSchedule(rw http.ResponseWriter, r *http.Request)
httpapi.Write(ctx, rw, http.StatusOK, codersdk.UserQuietHoursScheduleResponse{
RawSchedule: opts.Schedule.String(),
UserSet: opts.UserSet,
Time: opts.Schedule.Time(),
Time: opts.Schedule.TimeParsed().Format("15:40"),
Timezone: opts.Schedule.Location().String(),
Next: opts.Schedule.Next(time.Now().In(opts.Schedule.Location())),
})
@ -114,7 +114,7 @@ func (api *API) putUserQuietHoursSchedule(rw http.ResponseWriter, r *http.Reques
httpapi.Write(ctx, rw, http.StatusOK, codersdk.UserQuietHoursScheduleResponse{
RawSchedule: opts.Schedule.String(),
UserSet: opts.UserSet,
Time: opts.Schedule.Time(),
Time: opts.Schedule.TimeParsed().Format("15:40"),
Timezone: opts.Schedule.Location().String(),
Next: opts.Schedule.Next(time.Now().In(opts.Schedule.Location())),
})