This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
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.