November 2018
Intermediate to advanced
404 pages
10h 16m
English
Append the getTotal() function to the line right after boot(router:):
func getTotal(_ req: Request) -> String { let total = journal.total() print("Total Records: \(total)") return "\(total)"}
The function simply calls the JournalController total() function and return the total count of entries.
Read now
Unlock full access