Rename project to Mobilizon
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
16
lib/mobilizon_web/views/comment_view.ex
Normal file
16
lib/mobilizon_web/views/comment_view.ex
Normal file
@@ -0,0 +1,16 @@
|
||||
defmodule MobilizonWeb.CommentView do
|
||||
use MobilizonWeb, :view
|
||||
alias MobilizonWeb.CommentView
|
||||
|
||||
def render("index.json", %{comments: comments}) do
|
||||
%{data: render_many(comments, CommentView, "comment.json")}
|
||||
end
|
||||
|
||||
def render("show.json", %{comment: comment}) do
|
||||
%{data: render_one(comment, CommentView, "comment.json")}
|
||||
end
|
||||
|
||||
def render("comment.json", %{comment: comment}) do
|
||||
%{id: comment.id, uuid: comment.uuid, url: comment.url, text: comment.text}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user