Skip to content

Instantly share code, notes, and snippets.

@Yoloabdo
Last active April 1, 2019 13:33
Show Gist options
  • Select an option

  • Save Yoloabdo/df2ac8e71482eb5d4cbc06f9b5a75eac to your computer and use it in GitHub Desktop.

Select an option

Save Yoloabdo/df2ac8e71482eb5d4cbc06f9b5a75eac to your computer and use it in GitHub Desktop.
struct LoginRequestCommand: Command {
let id: String
let password: String
var completion: CallResponse<User>
init(_ id: String, password: String, completion: CallResponse<User>) {
self.id = id
self.password = password
self.completion = completion
}
func execute() throws {
UserRequest.login(id, password: password).send(User.self, completion: completion)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment