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