+2
-1
routes/handler.go
+2
-1
routes/handler.go
+17
-1
routes/routes.go
+17
-1
routes/routes.go
···
464
464
}
465
465
466
466
log.Printf("successfully saved session for %s (%s)", atSession.Handle, atSession.Did)
467
-
http.Redirect(w, r, "/", http.StatusPermanentRedirect)
467
+
http.Redirect(w, r, "/", http.StatusSeeOther)
468
468
return
469
469
}
470
470
}
···
564
564
w.WriteHeader(http.StatusOK)
565
565
}
566
566
}
567
+
568
+
func (h *Handle) Timeline(w http.ResponseWriter, r *http.Request) {
569
+
session, err := h.s.Get(r, "bild-session")
570
+
user := make(map[string]string)
571
+
if err != nil || session.IsNew {
572
+
// user is not logged in
573
+
} else {
574
+
user["handle"] = session.Values["handle"].(string)
575
+
user["did"] = session.Values["did"].(string)
576
+
}
577
+
578
+
if err := h.t.ExecuteTemplate(w, "timeline", user); err != nil {
579
+
log.Println(err)
580
+
return
581
+
}
582
+
}
+12
templates/layouts/topbar.html
+12
templates/layouts/topbar.html