From b5a92b119955939b5c0be0cf3fd5119ad31a2adf Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 16 Aug 2018 23:36:35 +0000 Subject: [PATCH] mastodon api: add undocumented fields to json response, return app id as string like mastodon itself does --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index cd9525252..d3b95e793 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -19,9 +19,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do with cs <- App.register_changeset(%App{}, params) |> IO.inspect(), {:ok, app} <- Repo.insert(cs) |> IO.inspect() do res = %{ - id: app.id, + id: app.id |> to_string, + name: app.name, client_id: app.client_id, - client_secret: app.client_secret + client_secret: app.client_secret, + redirect_uris: app.redirect_uris, + website: app.website } json(conn, res)