added multiplication
This commit is contained in:
@@ -2,12 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"github.com/gorilla/sessions"
|
||||
"log"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
)
|
||||
|
||||
const MAX = 12
|
||||
@@ -22,8 +23,9 @@ func main() {
|
||||
flag.Parse()
|
||||
http.Handle("/",
|
||||
http.FileServer(http.Dir(*static_files)))
|
||||
http.Handle("/api/v0/problem/", JsonHandler(problem))
|
||||
http.Handle("/api/v0/attempt/", JsonHandler(attempt))
|
||||
http.HandleFunc("/api/v0/addsub/problem/", addsub)
|
||||
http.HandleFunc("/api/v0/mul/problem/", mul)
|
||||
http.HandleFunc("/api/v0/attempt/", attempt)
|
||||
if err := http.ListenAndServe(*addr, nil); err != nil {
|
||||
log.Fatal("ListenAndServe:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user