Add config endpoint
This commit is contained in:
14
lib/mobilizon_web/resolvers/config.ex
Normal file
14
lib/mobilizon_web/resolvers/config.ex
Normal file
@@ -0,0 +1,14 @@
|
||||
defmodule MobilizonWeb.Resolvers.Config do
|
||||
@moduledoc """
|
||||
Handles the config-related GraphQL calls
|
||||
"""
|
||||
require Logger
|
||||
import Mobilizon.CommonConfig
|
||||
|
||||
@doc """
|
||||
Get config
|
||||
"""
|
||||
def get_config(_parent, _params, _context) do
|
||||
{:ok, %{name: instance_name(), registrations_open: registrations_open?()}}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user