Switch fervor api to use string ids

This commit is contained in:
Shadowfacts 2021-10-30 13:52:27 -04:00
parent b81bd879d4
commit f1435611ef
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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,