Hi there, I have the following Reactor code:
defmodule CreateNewAccount do
use Reactor, extensions: [Ash.Reactor]
alias Accounts.Account
ash do
default_domain Accounts
end
input(:email)
input(:email_is_verified?)
create :account, Account do
inputs %{
email: input(:email),
email_is_verified?: input(:email_is_verified?)
} do
transform(fn input ->
input
|> Map.drop([:email_is_verified?])
|> Map.put(
:email_verified_at,
if input[:email_is_verified] do
nil
else
DateTime.now()
end
)
end)
end
end
end
But I’m getting the following error
Compiling 2 files (.ex)
== Compilation error in file lib/create_new_account.ex ==
** (Spark.Error.DslError) [CreateNewAccount]
reactor -> create -> account:
The create step `:account refers to an input named `email_is_verified?` which doesn't exist.
Did you mean `updated_at`, `created_at`, `id`, `email` or `email_verified_at`?
Looks like the DSL isn’t recognizing that I’m transforming the input. Is this a bug or am I just doing something incorrect?
Thank you!