aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-08-16 23:36:35 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-08-16 23:40:42 +0000
commitb5a92b119955939b5c0be0cf3fd5119ad31a2adf (patch)
treed5d8b3f393e0f77e91ba2d02486f1e9ef48567f5 /lib
parent8c3880f18cb8bb8d8108082436b2ccff28589f51 (diff)
downloadpleroma-b5a92b119955939b5c0be0cf3fd5119ad31a2adf.tar.gz
mastodon api: add undocumented fields to json response, return app id as string like mastodon itself does
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex7
1 files 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)