Actor suspension refactoring
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -6,6 +6,14 @@ defmodule Mobilizon.Users.PushSubscription do
|
||||
alias Mobilizon.Users.User
|
||||
import Ecto.Changeset
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
digest: String.t(),
|
||||
user: User.t(),
|
||||
endpoint: String.t(),
|
||||
auth: String.t(),
|
||||
p256dh: String.t()
|
||||
}
|
||||
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
schema "user_push_subscriptions" do
|
||||
field(:digest, :string)
|
||||
|
||||
@@ -42,7 +42,7 @@ defmodule Mobilizon.Users do
|
||||
end
|
||||
end
|
||||
|
||||
@spec create_external(String.t(), String.t(), Map.t()) ::
|
||||
@spec create_external(String.t(), String.t(), map()) ::
|
||||
{:ok, User.t()} | {:error, Ecto.Changeset.t()}
|
||||
def create_external(email, provider, args \\ %{}) do
|
||||
with {:ok, %User{} = user} <-
|
||||
|
||||
Reference in New Issue
Block a user