func PostLogin(res http.ResponseWriter, req *http.Request) { if !info.CheckAddr(req.RemoteAddr) { return } data, err := ioutil.ReadAll(req.Body) check(err) js := bytes.NewReader(jSONify(string(data))) sres, err := http.Post("http://diamondnotcrush.herokuapp.com/user/login", "application/json", js) check(err) if err != nil { log.Println("Login failed") } else { log.Println("Login success") } Ping(res, req, sres) }
func GetLogin(res http.ResponseWriter, req *http.Request) { if !info.CheckAddr(req.RemoteAddr) { return } portal.Login(res, req) }
func MainPage(res http.ResponseWriter, req *http.Request) { if !info.CheckAddr(req.RemoteAddr) { return } portal.MainPage(res, req, info.Dir(), info.Port(), verify, userid) }