Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created December 29, 2017 22:29
Show Gist options
  • Save azamsharp/d8552e68edf7f4f8df2d75680a2ecf89 to your computer and use it in GitHub Desktop.
Save azamsharp/d8552e68edf7f4f8df2d75680a2ecf89 to your computer and use it in GitHub Desktop.
resolve conflicts
self.drop.get("nodes/resolve") { request in
return try Response.async { portal in
self.blockchainService.resolve { blockchain in
let blockchain = try! JSONEncoder().encode(blockchain)
portal.close(with: blockchain.makeResponse())
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment