add timestamp
This commit is contained in:
parent
655bd7e67b
commit
4440ea0981
1 changed files with 8 additions and 1 deletions
|
@ -1,10 +1,17 @@
|
|||
defmodule Pleroma.Elasticsearch.DocumentMappings.Hashtag do
|
||||
def id(obj), do: obj.id
|
||||
|
||||
def encode(hashtag) do
|
||||
def encode(%{timestamp: _} = hashtag) do
|
||||
%{
|
||||
hashtag: hashtag.name,
|
||||
timestamp: hashtag.timestamp
|
||||
}
|
||||
end
|
||||
|
||||
def encode(hashtag) do
|
||||
%{
|
||||
hashtag: hashtag.name,
|
||||
timestamp: hashtag.inserted_at
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue