1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-27 02:10:27 +00:00
mobilizon/lib/service/global_search/global_search.ex
Thomas Citharel 48935e2168
Add global search
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-08-28 10:02:06 +02:00

17 lines
507 B
Elixir

defmodule Mobilizon.Service.GlobalSearch do
@moduledoc """
Module to load the service adapter defined inside the configuration.
See `Mobilizon.Service.GlobalSearch.Provider`.
"""
@doc """
Returns the appropriate service adapter.
According to the config behind
`config :mobilizon, Mobilizon.Service.GlobalSearch,
service: Mobilizon.Service.GlobalSearch.Module`
"""
@spec service :: module
def service, do: get_in(Application.get_env(:mobilizon, __MODULE__), [:service])
end