From 9fbf1e5526afc2501242f7b056c460dcd46f6d18 Mon Sep 17 00:00:00 2001 From: ston88 <8529571+ston88@users.noreply.github.com> Date: Tue, 1 Oct 2019 17:53:03 +1000 Subject: [PATCH 1/2] Modified the typespec for push and push_list --- lib/exponent_server_sdk/push_notification.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/exponent_server_sdk/push_notification.ex b/lib/exponent_server_sdk/push_notification.ex index b7939ec..36b6561 100644 --- a/lib/exponent_server_sdk/push_notification.ex +++ b/lib/exponent_server_sdk/push_notification.ex @@ -26,7 +26,7 @@ defmodule ExponentServerSdk.PushNotification do @doc """ Send the push notification request when using a single message map """ - @spec push(PushMessage.t()) :: Parser.success() | Parser.error() + @spec push(map) :: Parser.success() | Parser.error() def push(message) when is_map(message) do message |> PushMessage.create() @@ -38,7 +38,7 @@ defmodule ExponentServerSdk.PushNotification do @doc """ Send the push notification request when using a list of message maps """ - @spec push_list(list(PushMessage.t())) :: Parser.success() | Parser.error() + @spec push_list(list(map)) :: Parser.success() | Parser.error() def push_list(messages) when is_list(messages) do messages |> PushMessage.create_from_list() From 69638e127ea11fc5cad76e3d798d1f80946a32fa Mon Sep 17 00:00:00 2001 From: ston88 <8529571+ston88@users.noreply.github.com> Date: Tue, 1 Oct 2019 18:38:05 +1000 Subject: [PATCH 2/2] Modified typespec for push_list --- lib/exponent_server_sdk/push_notification.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exponent_server_sdk/push_notification.ex b/lib/exponent_server_sdk/push_notification.ex index 36b6561..b38ee6b 100644 --- a/lib/exponent_server_sdk/push_notification.ex +++ b/lib/exponent_server_sdk/push_notification.ex @@ -38,7 +38,7 @@ defmodule ExponentServerSdk.PushNotification do @doc """ Send the push notification request when using a list of message maps """ - @spec push_list(list(map)) :: Parser.success() | Parser.error() + @spec push_list(list(map)) :: Parser.success_list() | Parser.error() def push_list(messages) when is_list(messages) do messages |> PushMessage.create_from_list()