mirror of https://github.com/vapor/docs.git
commit
94d9fedb25
|
|
@ -72,7 +72,7 @@ Now that we have covered initializing the model, we need to show it how to save
|
|||
|
||||
```swift
|
||||
final class User: Model {
|
||||
func makeNode() throws -> Node {
|
||||
func makeNode(context: Context) throws -> Node {
|
||||
return try Node(node: [
|
||||
"id": id,
|
||||
"name": name
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ let drop = Droplet()
|
|||
|
||||
// your magic here
|
||||
|
||||
drop.start()
|
||||
drop.run()
|
||||
```
|
||||
|
||||
Creation of the `Droplet` normally happens in the `main.swift` file.
|
||||
|
|
|
|||
Loading…
Reference in New Issue