diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-11-13 12:39:49 +0100 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-11-13 12:39:49 +0100 |
| commit | 543bda8e6c9eca9e861a88e6b1af9c7854e52381 (patch) | |
| tree | b468a12e98556a7f19714e417441fe894ac7a80f /code/noelan.go | |
| parent | 9af0a73a9da18dd41e70975abbd9e8279b80357f (diff) | |
checkpoint
Diffstat (limited to 'code/noelan.go')
| -rw-r--r-- | code/noelan.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/code/noelan.go b/code/noelan.go index da551b7..48f0bb2 100644 --- a/code/noelan.go +++ b/code/noelan.go @@ -21,6 +21,10 @@ // TODO(luca): If someone's want to access from another device his wishlist won't be synced, // so we must provide a way to get your own wishlist. // +// TODO(luca): Reimplement missing features. +// Since we only have one page we lose following functionality of the browser. +// - native navigation through history of urls +// - control+click to open in a new page package noelan @@ -406,11 +410,6 @@ func Run() { logger.Println("local storage key:", local_storage_key) logger.Println(people) - for index := range people { - fmt.Print(people[index].Other) - } - fmt.Print("\n") - go func() { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) @@ -426,7 +425,7 @@ func Run() { http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./assets")))) - http.HandleFunc("/list/", func(writer http.ResponseWriter, request *http.Request) { + http.HandleFunc("/api/list/", func(writer http.ResponseWriter, request *http.Request) { if request.Method == http.MethodPost { name := request.FormValue("name") text := request.FormValue("text") @@ -469,7 +468,7 @@ func Run() { } }) - http.HandleFunc("/choose/", func(writer http.ResponseWriter, request *http.Request) { + http.HandleFunc("/api/choose/", func(writer http.ResponseWriter, request *http.Request) { params := request.URL.Query() name := params.Get("name") found, person := FindPersonByName(people, name) |
