2021-12-30 16:11:53 +01:00
|
|
|
defmodule BumpWeb.SenderController do
|
|
|
|
use BumpWeb, :controller
|
|
|
|
|
|
|
|
alias Bump.Senders
|
|
|
|
|
|
|
|
def firebase(conn, %{"sender" => sender, "token" => token}) do
|
|
|
|
Senders.firebase(sender, token)
|
|
|
|
text conn, Jason.encode!(%{"status" => "OK"})
|
|
|
|
end
|
2022-01-03 13:07:33 +01:00
|
|
|
|
|
|
|
def deleteSender(conn, %{"sender" => sender}) do
|
|
|
|
Senders.delete(sender)
|
|
|
|
text conn, Jason.encode!(%{"status" => "OK"})
|
|
|
|
|
|
|
|
end
|
2021-12-30 16:11:53 +01:00
|
|
|
end
|