forked from potsda.mn/mobilizon
Remove unused addRelay mutation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
6eb2b6d31a
commit
05724476aa
|
@ -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) {
|
||||
|
|
|
@ -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}}})
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue