16 lines
311 B
Elixir
16 lines
311 B
Elixir
defmodule Bump.Firebase do
|
|
|
|
def test() do
|
|
IO.puts "Hello, world!"
|
|
end
|
|
|
|
|
|
def push(%{firebase_token: token}, message) do
|
|
IO.puts "Pushing #{message} to #{token}"
|
|
n = Pigeon.FCM.Notification.new({:token, token}, %{"body" => message})
|
|
Bump.FCM.push(n)
|
|
%{status: 'cheese'}
|
|
end
|
|
|
|
end
|