Switch fervor api to use string ids
This commit is contained in:
parent
b81bd879d4
commit
f1435611ef
|
@ -19,14 +19,14 @@ defmodule Frenzy.Feed do
|
|||
|
||||
def to_fervor(feed) do
|
||||
%{
|
||||
id: feed.id,
|
||||
id: feed.id |> Integer.to_string(),
|
||||
title: feed.title,
|
||||
url: feed.site_url,
|
||||
feed_url: feed.feed_url,
|
||||
service_url:
|
||||
Application.get_env(:frenzy, :base_url) <> Routes.feed_path(Endpoint, :show, feed.id),
|
||||
last_updated: DateTime.to_iso8601(feed.last_updated),
|
||||
group_ids: [feed.group_id]
|
||||
group_ids: [feed.group_id |> Integer.to_string()]
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ defmodule Frenzy.Group do
|
|||
|
||||
def to_fervor(group) do
|
||||
%{
|
||||
id: group.id,
|
||||
id: group.id |> Integer.to_string(),
|
||||
title: group.title,
|
||||
feed_ids: group.feeds |> Enum.map(fn f -> f.id end),
|
||||
feed_ids: group.feeds |> Enum.map(&Integer.to_string(&1.id)),
|
||||
service_url:
|
||||
Application.get_env(:frenzy, :base_url) <> Routes.group_path(Endpoint, :show, group.id)
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ defmodule Frenzy.Item do
|
|||
|
||||
def to_fervor(item) do
|
||||
res = %{
|
||||
id: item.id,
|
||||
feed_id: item.feed_id,
|
||||
id: item.id |> Integer.to_string(),
|
||||
feed_id: item.feed_id |> Integer.to_string(),
|
||||
title: item.title,
|
||||
author: item.creator,
|
||||
content: item.content,
|
||||
|
|
Loading…
Reference in New Issue