aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api.go9
-rw-r--r--website.go9
2 files changed, 9 insertions, 9 deletions
diff --git a/api.go b/api.go
index ac1928b..2fc4197 100644
--- a/api.go
+++ b/api.go
@@ -18,15 +18,6 @@ import (
"time"
)
-func handleGrill(w http.ResponseWriter, r *http.Request) {
- grills, err := ioutil.ReadDir("static/grill/")
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
- http.Redirect(w, r, "/static/grill/"+grills[rand.Intn(len(grills))].Name(), http.StatusFound)
-}
-
func handleFile(w http.ResponseWriter, r *http.Request) {
f, hash, size, modtime, err := storage.Get(strings.TrimRight(r.URL.Path, "/"))
if err != nil {
diff --git a/website.go b/website.go
index a917979..3cc30fc 100644
--- a/website.go
+++ b/website.go
@@ -92,3 +92,12 @@ func handlePage(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(os.Stderr, err)
}
}
+
+func handleGrill(w http.ResponseWriter, r *http.Request) {
+ grills, err := ioutil.ReadDir("static/grill/")
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
+ http.Redirect(w, r, "/static/grill/"+grills[rand.Intn(len(grills))].Name(), http.StatusFound)
+}