diff --git a/lib/tusker_push_web/controllers/app_registrations_controller.ex b/lib/tusker_push_web/controllers/app_registrations_controller.ex index 23b6732..ab4fc1b 100644 --- a/lib/tusker_push_web/controllers/app_registrations_controller.ex +++ b/lib/tusker_push_web/controllers/app_registrations_controller.ex @@ -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