tusker_push/lib/tusker_push_web/router.ex

24 lines
448 B
Elixir
Raw Normal View History

2024-04-05 18:23:00 +00:00
defmodule TuskerPushWeb.Router do
use TuskerPushWeb, :router
pipeline :api do
plug :accepts, ["json"]
end
2024-04-05 19:04:38 +00:00
scope "/app", TuskerPushWeb do
2024-04-05 18:23:00 +00:00
pipe_through :api
2024-04-05 19:04:38 +00:00
2024-04-07 16:08:17 +00:00
scope "/v1" do
resources "/registrations", AppRegistrationsController, only: [:create, :update, :delete]
2024-04-07 16:08:17 +00:00
end
2024-04-05 18:23:00 +00:00
end
2024-04-05 22:26:10 +00:00
scope "/mastodon", TuskerPushWeb do
pipe_through :api
2024-04-07 16:08:17 +00:00
scope "/v1" do
post "/push/:id", PushController, :push
end
2024-04-05 22:26:10 +00:00
end
2024-04-05 18:23:00 +00:00
end