mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 05:04:49 +00:00
meilisearch: show keys by name not description
This makes show-key’s output match our documentation as of Meilisearch 1.8.0-8-g4d5971f343c00d45c11ef0cfb6f61e83a8508208. Since I’m not sure if older versions maybe only provided description, it will fallback to the latter if no name parameter exists.
This commit is contained in:
parent
65aeaefa41
commit
59685e25d2
1 changed files with 6 additions and 2 deletions
|
@ -126,7 +126,11 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
|
||||||
decoded = Jason.decode!(result.body)
|
decoded = Jason.decode!(result.body)
|
||||||
|
|
||||||
if decoded["results"] do
|
if decoded["results"] do
|
||||||
Enum.each(decoded["results"], fn %{"description" => desc, "key" => key} ->
|
Enum.each(decoded["results"], fn
|
||||||
|
%{"name" => name, "key" => key} ->
|
||||||
|
IO.puts("#{name}: #{key}")
|
||||||
|
|
||||||
|
%{"description" => desc, "key" => key} ->
|
||||||
IO.puts("#{desc}: #{key}")
|
IO.puts("#{desc}: #{key}")
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue