import { Common } from 'pc-component-v3';


export const turnMasterCard = params => {
  var requestUrl = 'AssetInstanceResource/turnAttachedCard';


  return new Promise((resolve, reject) => {
    $.ajax({
      url: Common.getApiURL(requestUrl),
      type: 'post',
      contentType: 'application/json',


      data: JSON.stringify(params),

      beforeSend: function (request) {
        Common.addTokenToRequest(request);
      },
      success: function (data) {
        resolve(data);
      },
      error: function (XMLHttpRequest, textStatus, errorThrown) {
        reject(XMLHttpRequest);
      },
    });
  });
};
