a few more urls for ease of use
This commit is contained in:
parent
9149144a2b
commit
1181ee6acf
2 changed files with 6 additions and 3 deletions
7
honk.go
7
honk.go
|
@ -111,7 +111,9 @@ func homepage(w http.ResponseWriter, r *http.Request) {
|
|||
templinfo := getInfo(r)
|
||||
u := login.GetUserInfo(r)
|
||||
var honks []*Honk
|
||||
if u != nil {
|
||||
if r.URL.Path == "/front" || u == nil {
|
||||
honks = getpublichonks()
|
||||
} else {
|
||||
if r.URL.Path == "/atme" {
|
||||
honks = gethonksforme(u.UserID)
|
||||
} else {
|
||||
|
@ -119,8 +121,6 @@ func homepage(w http.ResponseWriter, r *http.Request) {
|
|||
honks = osmosis(honks, u.UserID)
|
||||
}
|
||||
templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
|
||||
} else {
|
||||
honks = getpublichonks()
|
||||
}
|
||||
|
||||
reverbolate(honks)
|
||||
|
@ -1364,6 +1364,7 @@ func serve() {
|
|||
getters := mux.Methods("GET").Subrouter()
|
||||
|
||||
getters.HandleFunc("/", homepage)
|
||||
getters.HandleFunc("/front", homepage)
|
||||
getters.HandleFunc("/robots.txt", nomoroboto)
|
||||
getters.HandleFunc("/rss", showrss)
|
||||
getters.HandleFunc("/u/{name:[[:alnum:]]+}", showuser)
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
<span><a href="/c">combos</a></span>
|
||||
<details>
|
||||
<summary>more</summary>
|
||||
<span><a href="/about">about</a></span>
|
||||
<span><a href="/front">front</a></span>
|
||||
<span><a href="/xzone">xzone</a></span>
|
||||
<span><a href="/zonkzone">zonkzone</a></span>
|
||||
<span><a href="/account">account</a></span>
|
||||
|
|
Loading…
Reference in a new issue