diff options
-rw-r--r-- | entry.go | 5 | ||||
-rw-r--r-- | main.go | 6 |
2 files changed, 1 insertions, 10 deletions
@@ -74,8 +74,3 @@ func EntriesSince(since time.Time) (entries []Entry, err error) { err = db.Select(&entries, "SELECT * FROM entries WHERE started_at > ?;", since) return } - -func FirstEntry() (entry Entry, err error) { - err = db.Get(&entry, "SELECT * FROM entries ORDER BY started_at ASC LIMIT 1;") - return -} @@ -103,11 +103,7 @@ func handleHome(pathname string) func(http.ResponseWriter, *http.Request) { } total, err := CountEntries() if err == nil { - home.Stats = append(home.Stats, count("Total", int(total))) - } - first, err := FirstEntry() - if err == nil { - home.Stats = append(home.Stats, Stat{"First visit", first.StartedAt.Format("_2 January 2006, 15:04")}) + home.Stats = append(home.Stats, count("All time", int(total))) } if len(home.Stats) < 1 { http.Error(w, err.Error(), http.StatusInternalServerError) |