aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/main.go b/main.go
index 160230b..511d7d6 100644
--- a/main.go
+++ b/main.go
@@ -61,14 +61,17 @@ func commentThreadsHandler(w http.ResponseWriter, r *http.Request) {
}
func handler(w http.ResponseWriter, r *http.Request) {
- path := strings.Trim(r.URL.Path, "/")
- if path == "" {
- path = "world"
+ id := strings.Trim(r.URL.Path, "/")
+ //if path == "" {
+ // TODO landing page
+ //}
+ if id == "watch" {
+ id = r.URL.Query().Get("v")
}
data := struct {
Id string
}{
- Id: path,
+ Id: id,
}
err := tmpl.Execute(w, data)
if err != nil {