From 6637d9119a6b5dbb1e61e9e30f44ca2226d4123a Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:30:42 -0500 Subject: [PATCH] handle the case to add company info when fetching project qa as admin --- backend/internal/v1/v1_projects/questions.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/internal/v1/v1_projects/questions.go b/backend/internal/v1/v1_projects/questions.go index b2d55361..af60c35c 100644 --- a/backend/internal/v1/v1_projects/questions.go +++ b/backend/internal/v1/v1_projects/questions.go @@ -94,6 +94,11 @@ func (h *Handler) handleGetQuestions(c echo.Context) error { arr[0].Answer = company.Name // second question is the date founded arr[1].Answer = time.Unix(company.DateFounded, 0).Format("2006-01-02") + } else if arr, ok := questions.([]db.GetQuestionsByProjectAsAdminRow); ok { + // first question is the company name + arr[0].Answer = company.Name + // second question is the date founded + arr[1].Answer = time.Unix(company.DateFounded, 0).Format("2006-01-02") } }