diff --git a/go.mod b/go.mod index f1fb8fe..c73b86b 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module deadbeef.codes/steven/ynab-portfolio-monitor -go 1.21.4 +go 1.22 + +// Goal is no third party dependencies \ No newline at end of file diff --git a/webServer.go b/webServer.go index 55c89a7..6ccfa9b 100644 --- a/webServer.go +++ b/webServer.go @@ -35,6 +35,8 @@ func homePageHandler(w http.ResponseWriter, r *http.Request) { //http.Redirect(w, r, fmt.Sprintf("https://app.ynab.com/%s", ynabClient.BudgetID), http.StatusSeeOther) } +// Returns status 200 if a refresh is not running, otherwise waits for refresh to finish +// Can be used by clients to tell when a refresh finishes func statusHandler(w http.ResponseWriter, r *http.Request) { refreshRunning.Lock() w.WriteHeader(http.StatusOK)