fix: setup options properly for ash 3.0 (#785)

This commit is contained in:
Peter Shoukry 2024-09-15 21:49:47 +03:00 committed by GitHub
parent 2cf46afa81
commit 53789c17e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,8 +34,8 @@ defmodule AshAuthentication.Strategy.Password.Actions do
strategy.resource
|> Query.new()
|> Query.set_context(context)
|> Query.for_read(strategy.sign_in_action_name, params)
|> Ash.read(options)
|> Query.for_read(strategy.sign_in_action_name, params, options)
|> Ash.read()
|> case do
{:ok, [user]} ->
{:ok, user}
@ -162,8 +162,8 @@ defmodule AshAuthentication.Strategy.Password.Actions do
ash_authentication?: true
}
})
|> Changeset.for_create(strategy.register_action_name, params)
|> Ash.create(options)
|> Changeset.for_create(strategy.register_action_name, params, options)
|> Ash.create()
end
def register(strategy, _params, _options) when is_struct(strategy, Password) do