Skip to content

Commit ee91986

Browse files
committed
chore: add review comments for #24
1 parent fdfed42 commit ee91986

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A simple server to transparently collect version information from Tinyauth insta
44

55
## How it works
66

7-
Every Tinyauth instance runs a goroutine (unless you choose to opt-out) that does a "heartbeat" every 12 hours indicating the instance is still "alive". The heartbeat contains the UUID generated by Tinyauth on start up and the version information. The server stores them in the SQLite database alongside with the last seen date. When you request all the instances, the server responds with an array containing the versions, UUIDs and last seen dates.
7+
Every Tinyauth instance runs a goroutine (unless you choose to opt-out) that does a "heartbeat" every 12 hours indicating the instance is still "alive". The heartbeat contains the UUID generated by Tinyauth on startup and the version information. The server stores them in the SQLite database alongside with the last seen date. When you request all the instances, the server responds with an array containing the versions, UUIDs and last seen dates.
88

99
## Running
1010

dashboard_handler.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
_ "embed"
5-
"fmt"
65
"html/template"
76
"log"
87
"net/http"
@@ -42,7 +41,7 @@ func (h *DashboardHandler) compileVersionStats(instances []queries.Instance) ver
4241
total++
4342
}
4443

45-
mostUsed := "unkown"
44+
mostUsed := "unknown"
4645
maxCount := 0
4746

4847
versionLabels := make([]string, 0, len(stats))
@@ -76,8 +75,6 @@ func (h *DashboardHandler) Dashboard(w http.ResponseWriter, r *http.Request) {
7675

7776
versionStats := h.compileVersionStats(instances)
7877

79-
fmt.Println(versionStats)
80-
8178
tmpl, err := template.New("dashboard").Parse(dashboardTemplate)
8279
if err != nil {
8380
http.Error(w, "Internal server error", http.StatusInternalServerError)

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func main() {
104104
router.Get("/dashboard", dashboardHandler.Dashboard)
105105
}
106106

107-
router.Get("/favicon.txt", dashboardHandler.Favicon)
107+
router.Get("/favicon.ico", dashboardHandler.Favicon)
108108
router.Get("/robots.txt", dashboardHandler.Robots)
109109

110110
srv := &http.Server{

0 commit comments

Comments
 (0)