Fakultas Ilmu Komputer UI

Commit 6d5c0d59 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Change route for google callback api

parent 894f5bde
......@@ -5,6 +5,10 @@ defmodule DiskuyWeb.Router do
plug DiskuyWeb.Auth.Pipeline
end
pipeline :auth_token do
plug DiskuyWeb.Auth.PipelineAuthToken
end
pipeline :api do
plug CORSPlug, origin: "*"
plug :accepts, ["json"]
......@@ -53,10 +57,10 @@ defmodule DiskuyWeb.Router do
end
scope "api/auth/google", DiskuyWeb do
pipe_through :api
get "/callback", UserController, :callback
options "/callback", UserController, :options
scope "/api/auth", DiskuyWeb do
pipe_through [:api, :auth_token]
get "/google/callback", UserController, :callback
options "/google/callback", UserController, :options
end
# Enables LiveDashboard only for development
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment