Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: final draw csv generation #445

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: final draw csv generation #445

wants to merge 3 commits into from

Conversation

ruioliveira02
Copy link
Member

Requires #431 to be merged first

conn =
conn
|> put_resp_content_type("text/csv")
|> put_resp_header("content-disposition", "attachment; filename=\"large_data.csv\"")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|> put_resp_header("content-disposition", "attachment; filename=\"large_data.csv\"")
|> put_resp_header("content-disposition", "attachment; filename=\"final_draw.csv\"")

Comment on lines +114 to +119
scope "/downloads" do
pipe_through [:require_staff_user]
get "/final_draw", CSVController, :final_draw
end

scope "/dashboard", Backoffice do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't this remove the :require_staff_user pipeline from the dashboard?

Comment on lines +39 to +43
defp final_draw_lines(attendee) do
for _ <- 1..attendee.attendee.entries do
[[attendee.id, attendee.name, attendee.handle]]
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defp final_draw_lines(attendee) do
for _ <- 1..attendee.attendee.entries do
[[attendee.id, attendee.name, attendee.handle]]
end
end
defp final_draw_lines(user) do
for _ <- 1..user.attendee.entries do
[[user.id, user.name, user.handle]]
end
end

Copy link
Member Author

@ruioliveira02 ruioliveira02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILTER FOR USERS WITH < 10 BADGES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants