code: function (fn) {
              return function (response) {
                  fn(response.status === "success" ? true : false, response.message, response.data);
              };
          }
docs: Handles ajax responses for flash notifications.
  callback fn is passed with 3 params,
  1. {Boolean} true if success
  2. {String} message either success or error
  3. {Object} json given by server
  @param {Function} fn