Open mesofranico opened 1 year ago
@mesofranico hello, please check router.ex
file for available routes.
But in short you can use these routes:
GET /tiktok - render the board POST /comment - parse comment and trigger the command
defmodule TicPhxWeb.Router do use TicPhxWeb, :router
pipeline :live_pipeline do plug :accepts, ["html"] plug :fetch_session plug :fetch_live_flash plug :put_root_layout, {TicPhxWeb.LayoutView, :root} plug :protect_from_forgery plug :put_secure_browser_headers end
pipeline :comments do plug :accepts, ["html"] plug :fetch_session end
pipeline :api do plug :accepts, ["json"] end
scope "/", TicPhxWeb do pipe_through :live_pipeline live "/tiktok", TikTokToeLive.Index, :index end
scope "/", TicPhxWeb do pipe_through :comments post "/comment", CommentsController, :index post "/reset", GameController, :reset end
#
if Mix.env() in [:dev, :test] do import Phoenix.LiveDashboard.Router
scope "/" do
pipe_through :live_pipeline
live_dashboard "/dashboard", metrics: TicPhxWeb.Telemetry
end
end
#
if Mix.env() == :dev do scope "/dev" do pipe_through :live_pipeline
forward "/mailbox", Plug.Swoosh.MailboxPreview
end
end end
Any help pls