Group Group Group Group Group Group Group Group Group

Missing line in Chapter 6's Token class

#1

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
I'm getting errors in chapter 7
Chapter 6/7- can't receive a notification
pinned #2