raphael
60888fd63c
- senders, which now have a firebase token are added as their own table in the database - firebase token api call added, which allows a user to connect a sender id to a firebase token - firebase library not yet connected to the saved firebase tokens
19 lines
304 B
Elixir
19 lines
304 B
Elixir
defmodule Bump.Senders.Sender do
|
|
use Ecto.Schema
|
|
import Ecto.Changeset
|
|
|
|
schema "senders" do
|
|
field :sender, :string
|
|
field :firebase_token, :string, default: ""
|
|
timestamps()
|
|
end
|
|
|
|
def changeset(sender, params) do
|
|
sender
|
|
|> cast(params, [:sender, :firebase_token])
|
|
end
|
|
end
|
|
|
|
|
|
|