hivedav

A curlable free/busy scheduler with CalDAV integration
git clone https://git.in0rdr.ch/hivedav.git
Log | Files | Refs | Pull requests | README | LICENSE

commit 9fc695154a792d0e89f9d3187947c8be742cd987
parent 983fb6dc9098218344a9c0fbae74d856514e0350
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Thu,  9 Nov 2023 22:31:11 +0100

feat(curlable): next/prev week help text

Diffstat:
Mserver.go | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server.go b/server.go @@ -303,8 +303,9 @@ func (s *Server) Week(w http.ResponseWriter, req *http.Request, ps httprouter.Pa if strings.Contains(userAgent, "curl") { w.Header().Set("Content-Type", "text/plain") io.WriteString(w, fmt.Sprintf("Serving week %d of year %d\n", week, year)) - io.WriteString(w, fmt.Sprintf("Use 'curl %s/list/%d' to list cubicle booking commands\n", s.config.HiveDavHost, week)) - + io.WriteString(w, fmt.Sprintf("List cubicle booking commands: 'curl %s/list/%d'\n", s.config.HiveDavHost, week)) + io.WriteString(w, fmt.Sprintf("> Next week: 'curl %s/week/%d'\n", s.config.HiveDavHost, week+1)) + io.WriteString(w, fmt.Sprintf("< Prev week: 'curl %s/week/%d'\n", s.config.HiveDavHost, week-1)) pt := prettytable.New(termTableData.TableHead) for _, r := range termTableData.Rows { // convert to slice of interface @@ -583,7 +584,7 @@ func (s *Server) ListCubiclesInWeek(w http.ResponseWriter, req *http.Request, ps if strings.Contains(userAgent, "curl") { w.Header().Set("Content-Type", "text/plain") io.WriteString(w, fmt.Sprintf("Serving week %d of year %d\n", week, year)) - io.WriteString(w, fmt.Sprintf("Use 'curl %s/week/%d' to check availability\n", s.config.HiveDavHost, week)) + io.WriteString(w, fmt.Sprintf("Back to calendar: 'curl %s/week/%d'\n", s.config.HiveDavHost, week)) pt := prettytable.New(tableData.TableHead) for _, r := range tableData.Rows {