Fakultas Ilmu Komputer UI

Commit 5d374bc1 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Create JSON View for Thread Pagination

parent cba4de95
defmodule DiskuyWeb.ThreadPagesView do
use DiskuyWeb, :view
# alias DiskuyWeb.ThreadPagesView
def render("pages.json", %{entries: entries, metadata: metadata}) do
%{entries: entries,
metadata: Map.from_struct(metadata)
}
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment