 
 class EditorViewController: UIViewController {
   var post: Post?
+  var client:Esa!
   
   @IBOutlet weak var navigationBar: UINavigationBar!
   @IBOutlet weak var cancelButton: UIButton!

    setTextViewStyle()
    textView.text = post?.bodyMd
    textField.text = post?.fullName
  }
  
  func setTextViewStyle(){

  
  @IBAction func post(sender: AnyObject) {
    SVProgressHUD.showWithStatus("Loading...")
    if let _ = post{
      patch()
    }else{
      newPost()
    }
  }
  
  func newPost(){
    client.newPost(post!){ result in
      switch result {
      case .Success(let posts):
        SVProgressHUD.showSuccessWithStatus("Success!")
        log?.info("\(posts)")
      case .Failure(let error):
        SVProgressHUD.showErrorWithStatus("Error!")
        log?.error("\(error)")
      }
    }
  }
  
  func patch(){
    client.patchPost(post!){ result in
      switch result {
      case .Success(let posts):
        SVProgressHUD.showSuccessWithStatus("Success!")
