mirror of
https://github.com/ash-project/ash_double_entry.git
synced 2024-09-17 03:53:17 +12:00
improvement: accept attributes on transfer create
ci: dependabot only weekly
This commit is contained in:
parent
1d732a0c6c
commit
2a961a486d
3 changed files with 17 additions and 5 deletions
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
|
@ -3,4 +3,10 @@ updates:
|
|||
- package-ecosystem: mix
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: weekly
|
||||
day: thursday
|
||||
groups:
|
||||
production-dependencies:
|
||||
dependency-type: production
|
||||
dev-dependencies:
|
||||
dependency-type: development
|
||||
|
|
|
@ -18,6 +18,10 @@ defmodule AshDoubleEntry.Transfer do
|
|||
balance_resource: [
|
||||
type: {:spark, Ash.Resource},
|
||||
doc: "The resource being used for balances"
|
||||
],
|
||||
create_accept: [
|
||||
type: {:wrap_list, :atom},
|
||||
doc: "Additional attributes to accept when creating a transfer"
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ defmodule AshDoubleEntry.Transfer.Transformers.AddStructure do
|
|||
attribute_writable?: true
|
||||
)
|
||||
|> Ash.Resource.Builder.add_action(:create, :transfer,
|
||||
accept: [:amount, :timestamp, :from_account_id, :to_account_id]
|
||||
accept:
|
||||
[:amount, :timestamp, :from_account_id, :to_account_id] ++
|
||||
AshDoubleEntry.Transfer.Info.transfer_create_accept!(dsl)
|
||||
)
|
||||
|> Ash.Resource.Builder.add_action(:read, :read_transfers,
|
||||
pagination: Ash.Resource.Builder.build_pagination(keyset?: true)
|
||||
|
|
Loading…
Reference in a new issue