Errata for Chapter 9

In Parent Child Relationship chapter.

Section on Querying the Relationship

“Here’s what this route handler does:
Define a new route handler, getUserHandler(_:), that returns Future<[User]>.”

The Future should be:
Future<User>
not
Future<[User]>

1 Like

Thanks! I’ll get this fixed!

a couple more small issues in this chapter…

“add the following after // Configuire the rest of your application here”:
No such comment in the file as built from template.
I assumed this would be at the end of the file, and everything worked just fine.

‘vapor cloud run --env=production “revert --all --yes”’ aborts with message: “[CommandError.excessInput: Too many arguments or unsupported options were supplied: [”–env=production"]]".

Running the command without --env=production and manually specifying the production environment when prompted reverts the db as expected.

2 Likes

Glad I stumbled upon this, I was confuzzled with why it didn’t work.

Hmm thanks for letting me know! Looks like something has changed, will get that fixed for the next EA