Vapor: 4.57.0 Release

Release date:
April 17, 2022
Previous version:
4.56.0 (released April 15, 2022)
Magnitude:
0 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.57.0

AndreYonadam

Directory Browser for 4.57.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

This patch was authored by @AndreYonadam and released by @0xTim.

This adds the ability to perform asynchronous work in the beforeRequest and afterResponse closures in XCTVapor.

E.g.

try await app.test(.GET, "/hello", beforeRequest: { req async throws in
  let currentUsersCount = try await User.query(on: app.db).count()
}, afterResponse: { res async throws in
  let newUsersCount = try await User.query(on: app.db).count()
})