Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

1.1.0

Latest
Compare
Choose a tag to compare
@simonedelmann simonedelmann released this 09 Jan 19:38
· 2 commits to master since this release

Async support for public instance

There is a new method func `public`(eventLoop: EventLoop, db: Database) -> EventLoopFuture<Public> in the Publicable protocol, which (by default) converts your public instance to an EventLoopFuture<Public>. You can override that behavior to run asynchronous code and access the database (querying relationships, ...) when calculating your public instance. (See updated README.md and tests for an example.)

Breaking changes
The internal method EventLoopFuture.public() has a new db parameter: func `public`(db: Database).
If you used crud-kit in the documented way, this should not affect you.