Skip to content

Commit 1404b09

Browse files
Fix: generate files endpoints respond JSON
There were two endpoints that trigger respondent files generation that were responding a plain "OK" string instead of a JSON as the UI was expecting. See #2362 See #2350 See d1b78b1
1 parent 1fac749 commit 1404b09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ask_web/controllers/respondent_controller.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ defmodule AskWeb.RespondentController do
862862
ActivityLog.generate_file(project, conn, survey, "incentives") |> Repo.insert()
863863

864864
SurveyResults.generate_incentives_file(survey_id)
865-
conn |> send_resp(200, "OK")
865+
conn |> render("ok.json")
866866
end
867867

868868
def interactions(conn, %{"project_id" => project_id, "survey_id" => survey_id}) do
@@ -881,7 +881,7 @@ defmodule AskWeb.RespondentController do
881881
ActivityLog.generate_file(project, conn, survey, "interactions") |> Repo.insert()
882882

883883
SurveyResults.generate_interactions_file(survey_id)
884-
conn |> send_resp(200, "OK")
884+
conn |> render("ok.json")
885885
end
886886

887887
defp mask_phone_numbers(respondent) do

0 commit comments

Comments
 (0)