mix format
This commit is contained in:
@ -7,11 +7,14 @@ defmodule SomethingErlangWeb.PageController do
|
||||
|
||||
def to_forum_path(conn, %{"to" => redir_params} = _params) do
|
||||
%{"forum_path" => path} = redir_params
|
||||
|
||||
with [_, thread] <- Regex.run(~r{threadid=(\d+)}, path),
|
||||
[_, page] <- Regex.run(~r{pagenumber=(\d+)}, path) do
|
||||
redirect(conn,
|
||||
to: Routes.thread_show_path(conn, :show, thread, page: page))
|
||||
to: Routes.thread_show_path(conn, :show, thread, page: page)
|
||||
)
|
||||
end
|
||||
|
||||
put_flash(conn, :error, "Could not resolve URL")
|
||||
render(conn, "index.html")
|
||||
end
|
||||
|
Reference in New Issue
Block a user