WIP feat: member user relation
This commit is contained in:
parent
997691746a
commit
4e6f5a517a
35 changed files with 1208 additions and 192 deletions
|
|
@ -21,4 +21,15 @@ defmodule Mv.Accounts do
|
|||
|
||||
resource Mv.Accounts.Token
|
||||
end
|
||||
|
||||
@doc """
|
||||
Register a new user with password using AshAuthentication's standard action.
|
||||
This creates a user and the notifier will automatically create a member.
|
||||
"""
|
||||
def register_with_password(params) do
|
||||
# Use AshAuthentication's standard register_with_password action
|
||||
Mv.Accounts.User
|
||||
|> Ash.Changeset.for_create(:register_with_password, params)
|
||||
|> Ash.create(domain: __MODULE__)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue