This commit is contained in:
Neale Pickett 2020-02-29 17:12:19 -07:00
parent 53947e2d64
commit 464261cd57
2 changed files with 1 additions and 2 deletions

View File

@ -21,6 +21,7 @@ func NewHTTPServer(base string, theme ThemeProvider, state StateProvider, puzzle
PuzzleProvider: puzzles,
ServeMux: http.NewServeMux(),
}
base = strings.TrimRight(base, "/")
h.HandleFunc(base+"/", h.ThemeHandler)
h.HandleFunc(base+"/state", h.StateHandler)
h.HandleFunc(base+"/register", h.RegisterHandler)

View File

@ -3,7 +3,6 @@ package main
import (
"github.com/spf13/afero"
"time"
"log"
)
type Theme struct {
@ -18,7 +17,6 @@ func NewTheme(fs afero.Fs) *Theme {
// I don't understand why I need this. The type checking system is weird here.
func (t *Theme) Open(name string) (ReadSeekCloser, error) {
log.Println(name)
return t.Fs.Open(name)
}