should be Seocnd, not Last
This commit is contained in:
parent
97f18f1df2
commit
4fa2e2bbd3
@ -11,7 +11,7 @@ import (
|
|||||||
type prob struct {
|
type prob struct {
|
||||||
Operation string
|
Operation string
|
||||||
First int
|
First int
|
||||||
Last int
|
Second int
|
||||||
}
|
}
|
||||||
|
|
||||||
type JsonHandler func(http.ResponseWriter, *http.Request)
|
type JsonHandler func(http.ResponseWriter, *http.Request)
|
||||||
|
2
main.go
2
main.go
@ -21,8 +21,8 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
http.Handle("/",
|
http.Handle("/",
|
||||||
http.FileServer(http.Dir(*static_files)))
|
http.FileServer(http.Dir(*static_files)))
|
||||||
http.HandleFunc("/api/v0/attempt/", JsonHandler(attempt))
|
|
||||||
http.Handle("/api/v0/problem/", JsonHandler(problem))
|
http.Handle("/api/v0/problem/", JsonHandler(problem))
|
||||||
|
http.Handle("/api/v0/attempt/", JsonHandler(attempt))
|
||||||
if err := http.ListenAndServe(*addr, nil); err != nil {
|
if err := http.ListenAndServe(*addr, nil); err != nil {
|
||||||
log.Fatal("ListenAndServe:", err)
|
log.Fatal("ListenAndServe:", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user