-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/bonfire-networks/bonfire-app/issues/916
- Loading branch information
Showing
7 changed files
with
31,409 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ geo = "~> 3.3" | |
zest = "~> 0.1" | ||
dataloader = "~> 2.0.0" | ||
absinthe_relay = "~> 1.5.2" | ||
apical = "~> 0.2.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
defmodule Bonfire.API.MastoCompatible do | ||
use Bonfire.UI.Common.Web, :controller | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
lib/web/router.ex → lib/web/graphql_router.ex
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule Bonfire.API.GraphQL.MastoCompatible.Router do | ||
@api_spec Path.join(:code.priv_dir(:bonfire_api_graphql), "specs/akkoma-openapi.json") | ||
|
||
defmacro include_masto_api do | ||
quote do | ||
scope "/" do | ||
pipe_through(:basic_json) | ||
pipe_through(:load_current_auth) | ||
|
||
# add here to override wrong priority order of routes | ||
get "/api/v1/accounts/verify_credentials", | ||
Bonfire.API.MastoCompatible.AccountController, | ||
:verify_credentials | ||
|
||
get "/api/v1/accounts/:id", Bonfire.API.MastoCompatible.AccountController, :show | ||
|
||
# require Apical | ||
# Apical.router_from_file(unquote(@api_spec), | ||
# controller: Bonfire.API.MastoCompatible, | ||
# nest_all_json: false, # If enabled, nest all json request body payloads under the "_json" key. Otherwise objects payloads will be merged into `conn.params`. | ||
# root: "/", | ||
# dump: :all # temp: ony for debug | ||
# ) | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.