implement creation of link on first step in backend

This commit is contained in:
2021-12-01 20:08:22 -05:00
parent 04225c44aa
commit 89c2a99283
9 changed files with 98 additions and 44 deletions

View File

@@ -1,3 +1,22 @@
defmodule EntenduWeb.LinkView do
use EntenduWeb, :view
alias EntenduWeb.LinkView
def render("show_authorized.json", %{link: link}) do
%{
id: link.id,
burn_after_reading: link.burn_after_reading,
expires: link.expires,
filename: link.filename,
filetype: link.filetype,
text_content: link.text_content,
file_content: link.file_content
}
end
def render("show_unauthorized.json", %{link: link}) do
%{
id: link.id
}
end
end