Code Monkey home page Code Monkey logo

Comments (6)

zanderxyz avatar zanderxyz commented on June 2, 2024

Strange, let me check - do you have a line number for the code causing the error?

from veil.

jean-smaug avatar jean-smaug commented on June 2, 2024

Ligne 62 of the veil.ex

defp new_session_url(conn, unique_id) do
    cur_uri = Phoenix.Controller.endpoint_module(conn).struct_url()
    cur_path = AppWeb.Router.Helpers.session_path(conn, :create, unique_id)
    AppWeb.Router.Helpers.url(cur_uri) <> cur_path
end

from veil.

zanderxyz avatar zanderxyz commented on June 2, 2024

I've fixed this - there's a new version up now. Things I changed:

  1. Removed get("/sessions/new/:request_id", SessionController, :create) from the Router.
  2. Changed cur_path = TestWeb.Router.Helpers.session_path(conn, :create, unique_id) to cur_path = TestWeb.Router.Helpers.session_path(conn, :create, [request_id: unique_id])

Please let me know if that works.

from veil.

jean-smaug avatar jean-smaug commented on June 2, 2024

No sorry, still got the same error

from veil.

zanderxyz avatar zanderxyz commented on June 2, 2024

Did you make the change to cur_path = TestWeb.Router.Helpers.session_path(conn, :create, [request_id: unique_id])? The error was happening because unique_id is a string rather than a list. But if you replace it with [request_id: unique_id] then it's a list and therefore implements the behaviour Enumerable. That will then generate the link correctly.

from veil.

jean-smaug avatar jean-smaug commented on June 2, 2024

Didn't understood that i need to make change, i thought that you were explaining what you've done ^^
OK for me it work great.

from veil.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.