fix(graphql): set default value for resource type parameter

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-06 14:43:51 +01:00
parent 94bf2e53bf
commit 09f41328ab
4 changed files with 10 additions and 5 deletions

View File

@@ -207,9 +207,9 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
{:ok, Resources.get_resource(old_parent_id), Resources.get_resource(new_parent_id)}
end
defp prepare_args(%{type: type} = args) do
defp prepare_args(args) do
args =
case type do
case Map.get(args, :type, :link) do
:folder ->
args