link |
Stars: 182 |
Last commit: 4 days ago |
Allow pivot editing closures to be async and throwing. by @gwynne in #585
When using the
attach(_:method:on:_:)
andattach(_:on:_:)
methods ofSiblingsProperty
, the optional closure provided to allow editing new pivots before they are saved can now optionally be boththrows
andasync
.Closes #581.
Additional changes:
- All versions of the
isAttached()
,attach()
, anddetach()
methods ofSiblingsProperty
will now throw errors (specifically cases of the newSiblingsPropertyError
enum) instead of callingfatalError()
when an unsaved model is encountered.
Thanks to the reviewers for their help:
Full Changelog: https://github.com/vapor/fluent-kit/compare/1.44.1...1.45.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics