Missing line in Chapter 6's Token class

In chapter 6, where the Token class is created, there’s a critical line of code missing. Vapor has to be told what to name the table so it doesn’t default to Token which is hard to work with. Please add this line of code just before the var id: UUID? line:

static let entity = "tokens"

I have fixed this for the next update of the book.

3 Likes