mobilizon.chapril.org-mobil.../lib/mobilizon_web/resolvers/config.ex

20 lines
406 B
Elixir
Raw Normal View History

2019-03-22 10:53:38 +01:00
defmodule MobilizonWeb.Resolvers.Config do
@moduledoc """
2019-09-08 00:05:54 +02:00
Handles the config-related GraphQL calls.
2019-03-22 10:53:38 +01:00
"""
2019-09-08 00:05:54 +02:00
alias Mobilizon.Config
2019-03-22 10:53:38 +01:00
@doc """
2019-09-08 00:05:54 +02:00
Gets config.
2019-03-22 10:53:38 +01:00
"""
def get_config(_parent, _params, _context) do
{:ok,
%{
2019-09-08 00:05:54 +02:00
name: Config.instance_name(),
registrations_open: Config.instance_registrations_open?(),
description: Config.instance_description()
}}
2019-03-22 10:53:38 +01:00
end
end