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:
Amogh Lele committed 2022-05-21 16:21:02 +05:30
1 parent 20a0b45954
commit dbe75a5065
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)