feat(shorten): improve ux by showing users what the shortened url is
Signed-off-by: Amogh Lele <amogh@dyte.io>
This commit is contained in:
4 files changed
+95
-64
No files matched your search
@@ -2,7 +2,6 @@ defmodule KetbinWeb.Api.PasteController do
|
||||
use KetbinWeb, :controller
|
||||
|
||||
alias Ketbin.Pastes
|
||||
alias Ketbin.Pastes.Paste
|
||||
alias Ketbin.Pastes.Utils
|
||||
|
||||
def show(conn, %{"id" => id}) do
|
||||
|
||||
@@ -37,7 +37,7 @@ defmodule KetbinWeb.PageController do
|
||||
[head | tail] = String.split(id, ".")
|
||||
paste = Pastes.get_paste!(head)
|
||||
|
||||
render(conn, "show.html",
|
||||
render(conn, "shorten.html",
|
||||
paste: paste,
|
||||
show_edit: show_edit,
|
||||
extension: if(tail == [], do: "", else: tail)
|
||||
|
||||
Reference in new issue
Block a user