mastodon api: add undocumented fields to json response, return app id as string like...
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 16 Aug 2018 23:36:35 +0000 (23:36 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 16 Aug 2018 23:40:42 +0000 (23:40 +0000)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index cd952525273a3b8f557949539598428affe57598..d3b95e793e660df9fd8a71930cf244ec2aba8f7a 100644 (file)
@@ -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)