export default function(data){
  return new Promise((resolve, reject) => {
    if (data && data.result === 'SUCCESS') {
      if (data.dataList || data.dataList === null){
        resolve(data.dataList);
      } else {
        resolve(data);
      }
    } else {
      if (data) {
        reject(data.message);
      } else {
        reject(data);
      }
    }
  });
}
