Add anonymous and remote participations
This commit is contained in:
@@ -60,6 +60,21 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
||||
field(:number_of_reports, :integer, description: "The number of current opened reports")
|
||||
end
|
||||
|
||||
object :admin_settings do
|
||||
field(:instance_name, :string)
|
||||
field(:instance_description, :string)
|
||||
field(:instance_terms, :string)
|
||||
field(:instance_terms_type, :instance_terms_type)
|
||||
field(:instance_terms_url, :string)
|
||||
field(:registrations_open, :boolean)
|
||||
end
|
||||
|
||||
enum :instance_terms_type do
|
||||
value(:url, as: "URL")
|
||||
value(:default, as: "DEFAULT")
|
||||
value(:custom, as: "CUSTOM")
|
||||
end
|
||||
|
||||
object :admin_queries do
|
||||
@desc "Get the list of action logs"
|
||||
field :action_logs, type: list_of(:action_log) do
|
||||
@@ -72,6 +87,10 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
||||
resolve(&Admin.get_dashboard/3)
|
||||
end
|
||||
|
||||
field :admin_settings, type: :admin_settings do
|
||||
resolve(&Admin.get_settings/3)
|
||||
end
|
||||
|
||||
field :relay_followers, type: :paginated_follower_list do
|
||||
arg(:page, :integer, default_value: 1)
|
||||
arg(:limit, :integer, default_value: 10)
|
||||
@@ -115,5 +134,16 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
|
||||
|
||||
resolve(&Admin.reject_subscription/3)
|
||||
end
|
||||
|
||||
field :save_admin_settings, type: :admin_settings do
|
||||
arg(:instance_name, :string)
|
||||
arg(:instance_description, :string)
|
||||
arg(:instance_terms, :string)
|
||||
arg(:instance_terms_type, :instance_terms_type)
|
||||
arg(:instance_terms_url, :string)
|
||||
arg(:registrations_open, :boolean)
|
||||
|
||||
resolve(&Admin.save_settings/3)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user