updates list rest api
- list no longer returns a json array but a json object, which contains a "messages" json array instead
This commit is contained in:
@ -16,12 +16,12 @@ defmodule Bump.Messages do
|
||||
Repo.delete_all(from m in "messages", where: m.id == ^res.id)
|
||||
%{data: res.data, timestamp: res.timestamp}
|
||||
else
|
||||
nil
|
||||
%{}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def peak(sender) do
|
||||
def peek(sender) do
|
||||
query = from m in "messages",
|
||||
where: m.sender == ^sender,
|
||||
order_by: [desc: m.timestamp],
|
||||
|
Reference in New Issue
Block a user