1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 07:52:43 +00:00

Remove unused addRelay mutation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-05-06 13:11:29 +02:00
parent 6eb2b6d31a
commit 05724476aa
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
4 changed files with 0 additions and 31 deletions

View file

@ -131,15 +131,6 @@ export const ADD_INSTANCE = gql`
${INSTANCE_FRAGMENT}
`;
export const ADD_RELAY = gql`
mutation addRelay($address: String!) {
addRelay(address: $address) {
...relayFragment
}
}
${RELAY_FRAGMENT}
`;
export const REMOVE_RELAY = gql`
mutation removeRelay($address: String!) {
removeRelay(address: $address) {

View file

@ -511,15 +511,6 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
end
end
@spec create_relay(any(), map(), Absinthe.Resolution.t()) ::
{:ok, Follower.t()} | {:error, any()}
def create_relay(_parent, %{address: address}, %{context: %{current_user: %User{role: role}}})
when is_admin(role) do
with {:ok, _activity, follow} <- Relay.follow(address) do
{:ok, follow}
end
end
@spec remove_relay(any(), map(), Absinthe.Resolution.t()) ::
{:ok, Follower.t()} | {:error, any()}
def remove_relay(_parent, %{address: address}, %{context: %{current_user: %User{role: role}}})

View file

@ -352,13 +352,6 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do
resolve(&Admin.create_instance/3)
end
@desc "Add a relay subscription"
field :add_relay, type: :follower do
arg(:address, non_null(:string), description: "The relay hostname to add")
resolve(&Admin.create_relay/3)
end
@desc "Delete a relay subscription"
field :remove_relay, type: :follower do
arg(:address, non_null(:string), description: "The relay hostname to delete")

View file

@ -1906,12 +1906,6 @@ type RootMutationType {
domain: String!
): Instance
"Add a relay subscription"
addRelay(
"The relay hostname to add"
address: String!
): Follower
"Delete a relay subscription"
removeRelay(
"The relay hostname to delete"