Last active
August 31, 2018 10:30
-
-
Save bvjebin/11affb8831819f873705bae548c394eb to your computer and use it in GitHub Desktop.
Export API Endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Example.AdminController do | |
use Example, :controller | |
def export(conn, %{"email" => email}) do | |
Example.User.get_dump() | |
|> Example.Export.export_and_email(email) | |
json(conn, %{ | |
success: true, | |
message: "Your request is accepted. Data will be emailed shortly" | |
}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment