Add missing return

This commit is contained in:
Tulir Asokan 2024-02-26 16:43:36 +02:00
parent 59b3b7d0ec
commit b3457907fa

View file

@ -333,10 +333,12 @@ func (prov *ProvisioningAPI) GoogleLoginStart(w http.ResponseWriter, r *http.Req
} }
var req ReqGoogleLoginStart var req ReqGoogleLoginStart
if err := json.NewDecoder(r.Body).Decode(&req); err != nil { if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
log.Warn().Err(err).Msg("Failed to parse request JSON")
jsonResponse(w, http.StatusBadRequest, Error{ jsonResponse(w, http.StatusBadRequest, Error{
Error: "Failed to parse request JSON", Error: "Failed to parse request JSON",
ErrCode: "bad json", ErrCode: "bad json",
}) })
return
} }
emoji, err := user.AsyncLoginGoogleStart(req.Cookies) emoji, err := user.AsyncLoginGoogleStart(req.Cookies)
if err != nil { if err != nil {