hassamali

hassamali

Pow session path not working

i tried to register with pow route its working but when i am trying to sign out with pow session with method delete its not working and complaining

no route found for GET /session (QazalbashWeb.Router)

with the pow and session these are only available routes

pow_session_path  GET     /session/new                             Pow.Phoenix.SessionController :new
pow_session_path  POST    /session                                 Pow.Phoenix.SessionController :create
pow_session_path  DELETE  /session                                 Pow.Phoenix.SessionController :delete

What i am doing on the front-end is this, Register is working fine but not sign out

<%= link "Sign Out", to: Routes.pow_session_path(@conn, :delete), method: :delete  %>
<%= link "Register", to: Routes.pow_registration_path(@conn, :new) %>

Marked As Solved

hassamali

hassamali

Make sure that you got import "phoenix_html" in your JS, and restart the server if necessary. This is just a default Phoenix HTML anchor link, and will work as long as the JS is enabled and priv/static/phoenix_html.js has been loaded into your build tools.

Also Liked

wowlixir

wowlixir

Hmm, how do I know if that is the case? I just checked and I do have import "phoenix_html" in my app.js (which is loaded in my layout template file), as well as "dependencies": { "phoenix": "file:../deps/phoenix", "phoenix_html": "file:../deps/phoenix_html" } in my package.json, but I don’t see phoenix_html.js in my priv/static.

Edit: Oh, if you mean deps/phoenix_html/priv/static/phoenix_html.js, then yes, it was already there.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement