Created
April 8, 2018 18:46
-
-
Save azamsharp/6321bdf921ebb400e553aa84ad39e3f4 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
self.drop.get("/driving-records/:drivingLicenseNumber") { request in | |
guard let drivingLicenseNumber = request.parameters["drivingLicenseNumber"]?.string else { | |
return try JSONEncoder().encode(["message":"drivingLicenseNumber parameter not found!"]) | |
} | |
let blockchain = self.blockchainService.blockchain | |
let transactions = blockchain?.transactionsBy(drivingLicenseNumber: drivingLicenseNumber) | |
return try JSONEncoder().encode(transactions) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment