WIP feat: member user relation

This commit is contained in:
Moritz 2025-07-24 20:15:01 +02:00
parent 997691746a
commit 4e6f5a517a
Signed by: moritz
GPG key ID: 1020A035E5DD0824
35 changed files with 1208 additions and 192 deletions

View file

@ -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