From 72846f62095560acab7b23b7cdd06e484ea03d9e Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Sat, 27 Apr 2024 10:40:49 +0100 Subject: [PATCH] https://github.com/bonfire-networks/bonfire-app/issues/916 --- lib/web/masto_compatible_router.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/web/masto_compatible_router.ex b/lib/web/masto_compatible_router.ex index 6fed1e3..e5d55f5 100644 --- a/lib/web/masto_compatible_router.ex +++ b/lib/web/masto_compatible_router.ex @@ -4,8 +4,7 @@ defmodule Bonfire.API.GraphQL.MastoCompatible.Router do defmacro include_masto_api do quote do scope "/" do - pipe_through(:basic_json) - pipe_through(:load_current_auth) + pipe_through([:basic_json, :load_authorization, :load_current_auth]) # add here to override wrong priority order of routes get "/api/v1/accounts/verify_credentials", @@ -14,6 +13,10 @@ defmodule Bonfire.API.GraphQL.MastoCompatible.Router do get "/api/v1/accounts/:id", Bonfire.API.MastoCompatible.AccountController, :show + get "/api/v1/instance", Bonfire.API.MastoCompatible.InstanceController, :show + + post "/api/v1/apps", Bonfire.API.MastoCompatible.AppController, :create + # require Apical # Apical.router_from_file(unquote(@api_spec), # controller: Bonfire.API.MastoCompatible,