WIP
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/play-with-docker/play-with-docker/config"
|
||||
"github.com/play-with-docker/play-with-docker/services"
|
||||
"github.com/play-with-docker/play-with-docker/recaptcha"
|
||||
)
|
||||
|
||||
type NewSessionResponse struct {
|
||||
@@ -17,7 +17,7 @@ type NewSessionResponse struct {
|
||||
|
||||
func NewSession(rw http.ResponseWriter, req *http.Request) {
|
||||
req.ParseForm()
|
||||
if !services.IsHuman(req, rw) {
|
||||
if !recaptcha.IsHuman(req, rw) {
|
||||
// User it not a human
|
||||
rw.WriteHeader(http.StatusForbidden)
|
||||
return
|
||||
@@ -38,8 +38,8 @@ func NewSession(rw http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
|
||||
}
|
||||
duration := services.GetDuration(reqDur)
|
||||
s, err := services.NewSession(duration, stack)
|
||||
duration := config.GetDuration(reqDur)
|
||||
s, err := core.SessionNew(duration, stack, "")
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
//TODO: Return some error code
|
||||
|
||||
Reference in New Issue
Block a user