Skip to content

Commit

Permalink
Add PING route
Browse files Browse the repository at this point in the history
  • Loading branch information
jclem committed Nov 22, 2018
1 parent 515bf64 commit 73862e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/post2slack/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ defmodule Post2Slack.Router do
|> send_resp(302, body)
end

get "/ping" do
conn
|> put_resp_header("content-type", "text/plain; charset=utf-8")
|> send_resp(200, "OK")
end

get "/oauth/slack/callback" do
with :ok <- Post2Slack.StateToken.verify_token(conn.params["state"]),
{:ok, access_token} <- Slack.exchange_code(conn.params["code"]),
Expand Down

0 comments on commit 73862e3

Please sign in to comment.