func LoginPOST(ctx context.Context, w http.ResponseWriter, r *http.Request, webui services.WebUIClient) { if err := r.ParseForm(); err != nil { log.Printf("r.ParseForm error: %v", err) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } resp, err := webui.LoginPOST(ctx, &records.LoginPOSTRequest{ Public: r.FormValue("public"), Private: r.FormValue("private"), }) if err != nil { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } resp.ServeHTTP(w, r) }