diff options
author | Tim Keller <tjkeller.xyz> | 2025-05-23 22:25:49 -0500 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2025-05-23 22:25:49 -0500 |
commit | 6b0385c495b246859d27bfa75e1bd4dfa45c2be2 (patch) | |
tree | 0f2161499a6c72564bd4e730bca8464072f7845e /main.go | |
parent | 285c3e573e1d01b952342aeaf91aa09303883ebf (diff) | |
download | mintube-6b0385c495b246859d27bfa75e1bd4dfa45c2be2.tar.xz mintube-6b0385c495b246859d27bfa75e1bd4dfa45c2be2.zip |
support /watch?v=
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 { |