mix format

This commit is contained in:
2022-11-07 13:49:31 +01:00
parent 51b9cc7f76
commit 0e74b0e1e0
16 changed files with 137 additions and 110 deletions

View File

@ -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