diff options
-rw-r--r-- | derelict.go | 5 | ||||
-rw-r--r-- | view.tmpl | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/derelict.go b/derelict.go index 1c93399..1d49636 100644 --- a/derelict.go +++ b/derelict.go @@ -84,6 +84,7 @@ func handleRecent(w http.ResponseWriter, r *http.Request) { } func handleView(w http.ResponseWriter, r *http.Request) { - id := mux.Vars(r)["id"] - templates.ExecuteTemplate(w, "view", id) + battle := Battle{Id: mux.Vars(r)["id"]} + storage.LoadBattle(&battle) + templates.ExecuteTemplate(w, "view", &battle) } @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <link rel="stylesheet" type="text/css" href="/style.css"> -<title>{{.}} - Derelict</title> +<title>{{.Name}} - Derelict</title> <body> <div id="wrapper"> <div id="container"></div> |