Skip to content

Commit

Permalink
handle the case to add company info when fetching project qa as admin (
Browse files Browse the repository at this point in the history
  • Loading branch information
juancwu authored Feb 6, 2025
2 parents 6bfa33e + 6637d91 commit b4c0fdf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/internal/v1/v1_projects/questions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit b4c0fdf

Please sign in to comment.