From: William Pitcock Date: Thu, 16 Aug 2018 23:36:35 +0000 (+0000) Subject: mastodon api: add undocumented fields to json response, return app id as string like... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b5a92b119955939b5c0be0cf3fd5119ad31a2adf;p=akkoma mastodon api: add undocumented fields to json response, return app id as string like mastodon itself does --- 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)