mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-17 22:47:59 +01:00
13 lines
334 B
Elixir
13 lines
334 B
Elixir
|
defmodule PhilomenaWeb.GalleryJson do
|
||
|
def as_json(gallery) do
|
||
|
%{
|
||
|
id: gallery.id,
|
||
|
title: gallery.title,
|
||
|
thumbnail_id: gallery.thumbnail_id,
|
||
|
spoiler_warning: gallery.spoiler_warning,
|
||
|
description: gallery.description,
|
||
|
user: gallery.creator.name,
|
||
|
user_id: gallery.creator_id
|
||
|
}
|
||
|
end
|
||
|
end
|