Add link headers in ChatController.index2

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2021-12-12 17:43:18 +01:00
parent 5c573a8a28
commit dff435488d

View file

@ -151,7 +151,9 @@ def index2(%{assigns: %{user: user}} = conn, params) do
index_query(user, params) index_query(user, params)
|> Pagination.fetch_paginated(params) |> Pagination.fetch_paginated(params)
render(conn, "index.json", chats: chats) conn
|> add_link_headers(chats)
|> render("index.json", chats: chats)
end end
defp index_query(%{id: user_id} = user, params) do defp index_query(%{id: user_id} = user, params) do