diff --git a/build.sh b/build.sh index 93c24656..6fe68188 100644 --- a/build.sh +++ b/build.sh @@ -1,14 +1,14 @@ -#!/bin/bash -set -e - -# Install rice tool if not present -if ! [ -x "$(command -v rice)" ]; then - go get github.com/GeertJohan/go.rice/rice -fi - -# Clean the dist folder and build the assets -rm -rf assets/dist -npm run build - -# Embed the assets using rice -rice embed-go +#!/bin/bash +set -e + +# Install rice tool if not present +if ! [ -x "$(command -v rice)" ]; then + go get github.com/GeertJohan/go.rice/rice +fi + +# Clean the dist folder and build the assets +rm -rf assets/dist +npm run build + +# Embed the assets using rice +rice embed-go diff --git a/http/auth.go b/http/auth.go index cc6f9977..fbe8f3f8 100644 --- a/http/auth.go +++ b/http/auth.go @@ -38,10 +38,7 @@ func reCaptcha(secret string, response string) (bool, error) { } var data struct { - Success bool `json:"success"` - ChallengeTS time.Time `json:"challenge_ts"` - Hostname string `json:"hostname"` - ErrorCodes interface{} `json:"error-codes"` + Success bool `json:"success"` } err = json.NewDecoder(resp.Body).Decode(&data) diff --git a/http/http.go b/http/http.go index f674b312..c40435c5 100644 --- a/http/http.go +++ b/http/http.go @@ -223,13 +223,12 @@ func renderFile(c *fm.Context, w http.ResponseWriter, file string) (int, error) w.Header().Set("Content-Type", contentType+"; charset=utf-8") data := map[string]interface{}{ - "BaseURL": c.RootURL(), - "NoAuth": c.NoAuth, - "Version": fm.Version, - "CSS": template.CSS(c.CSS), - "ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "", - "ReCaptchaKey": c.ReCaptchaKey, - "ReCaptchaSecret": c.ReCaptchaSecret, + "BaseURL": c.RootURL(), + "NoAuth": c.NoAuth, + "Version": fm.Version, + "CSS": template.CSS(c.CSS), + "ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "", + "ReCaptchaKey": c.ReCaptchaKey, } if c.StaticGen != nil {