Include device token in registration response
This commit is contained in:
parent
ba4e1d7abf
commit
26c0d2565b
|
@ -21,7 +21,8 @@ defmodule TuskerPushWeb.AppRegistrationsController do
|
|||
conn
|
||||
|> json(%{
|
||||
id: id,
|
||||
endpoint: url(~p"/mastodon/v1/push/#{id}")
|
||||
endpoint: url(~p"/mastodon/v1/push/#{id}"),
|
||||
device_token: token
|
||||
})
|
||||
else
|
||||
{:error, %Changeset{valid?: false} = changeset} ->
|
||||
|
@ -64,7 +65,11 @@ defmodule TuskerPushWeb.AppRegistrationsController do
|
|||
{:registration, TuskerPush.get_registration(id)},
|
||||
{:ok, _} <- TuskerPush.update_registration(registration, params) do
|
||||
conn
|
||||
|> json(%{id: id, endpoint: url(~p"/mastodon/v1/push/#{id}")})
|
||||
|> json(%{
|
||||
id: id,
|
||||
endpoint: url(~p"/mastodon/v1/push/#{id}"),
|
||||
device_token: token
|
||||
})
|
||||
else
|
||||
{:registration, nil} ->
|
||||
conn
|
||||
|
|
Loading…
Reference in New Issue