mirror of https://github.com/vapor/docs.git
update cn fluent model translation (#743)
This commit is contained in:
parent
b7d6f6ff5b
commit
9c8329929c
|
|
@ -562,7 +562,7 @@ struct PlanetMiddleware: ModelMiddleware {
|
|||
|
||||
```swift
|
||||
struct PlanetMiddleware: AsyncModelMiddleware {
|
||||
func create(model: Planet, on db: Database, next: AnyModelResponder) async throws {
|
||||
func create(model: Planet, on db: Database, next: AnyAsyncModelResponder) async throws {
|
||||
// 在创建模型之前,可以在这里修改模型。
|
||||
model.name = model.name.capitalized()
|
||||
try await next.create(model, on: db)
|
||||
|
|
|
|||
Loading…
Reference in New Issue