mirror of https://github.com/dirtbags/moth.git
Oops
This commit is contained in:
parent
53947e2d64
commit
464261cd57
|
@ -21,6 +21,7 @@ func NewHTTPServer(base string, theme ThemeProvider, state StateProvider, puzzle
|
||||||
PuzzleProvider: puzzles,
|
PuzzleProvider: puzzles,
|
||||||
ServeMux: http.NewServeMux(),
|
ServeMux: http.NewServeMux(),
|
||||||
}
|
}
|
||||||
|
base = strings.TrimRight(base, "/")
|
||||||
h.HandleFunc(base+"/", h.ThemeHandler)
|
h.HandleFunc(base+"/", h.ThemeHandler)
|
||||||
h.HandleFunc(base+"/state", h.StateHandler)
|
h.HandleFunc(base+"/state", h.StateHandler)
|
||||||
h.HandleFunc(base+"/register", h.RegisterHandler)
|
h.HandleFunc(base+"/register", h.RegisterHandler)
|
||||||
|
|
|
@ -3,7 +3,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
"time"
|
"time"
|
||||||
"log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Theme struct {
|
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.
|
// I don't understand why I need this. The type checking system is weird here.
|
||||||
func (t *Theme) Open(name string) (ReadSeekCloser, error) {
|
func (t *Theme) Open(name string) (ReadSeekCloser, error) {
|
||||||
log.Println(name)
|
|
||||||
return t.Fs.Open(name)
|
return t.Fs.Open(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue