elixir - How can I rename a pathname for the default resources generated by Phoenix.Router? -
i've got userscontroller
i'm using authentication not viewing users profiles , not, got
/users/new // /users/new // post /users/login // /users/login // post
i want rename to
/auth/register /auth/register /auth/login /auth/login
is possible accomplish right through router?
right have this:
resources "/users", usercontroller, only: [:create, :new]
is there way like
resources "/auth", usercontroller, only: [create: "register", new: "register"]
or that. information great thanks.
this isn't possible right using resources
paths hardcoded in route generators in phoenix.router
: https://github.com/phoenixframework/phoenix/blob/6350e7052548c939b572dbf6d5556c88bed4212d/lib/phoenix/router.ex#l208-l233
you'll have create routes manually:
get "/users/register", usercontroller, :new post "/users/register", usercontroller, :create
Comments
Post a Comment