Created
July 1, 2020 20:01
-
-
Save azamsharp/dafa86299b52e469cf84a9aca83e9614 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func routes(_ app: Application) throws { | |
app.get("books") { req -> [Book] in | |
let books = [Book(name: "Atomic Habits", isbn: "1234"), Book(name: "Peek Performance", isbn: "3456"), Book(name: "How Not to Die", isbn: "6567")] | |
return books | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment