-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
8d7efd7
to
0a3c99b
Compare
0a3c99b
to
2ee7fa1
Compare
conn = | ||
conn | ||
|> put_resp_content_type("text/csv") | ||
|> put_resp_header("content-disposition", "attachment; filename=\"large_data.csv\"") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|> put_resp_header("content-disposition", "attachment; filename=\"large_data.csv\"") | |
|> put_resp_header("content-disposition", "attachment; filename=\"final_draw.csv\"") |
scope "/downloads" do | ||
pipe_through [:require_staff_user] | ||
get "/final_draw", CSVController, :final_draw | ||
end | ||
|
||
scope "/dashboard", Backoffice do |
There was a problem hiding this comment.
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?
defp final_draw_lines(attendee) do | ||
for _ <- 1..attendee.attendee.entries do | ||
[[attendee.id, attendee.name, attendee.handle]] | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this 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
Requires #431 to be merged first