JSFiddle - React, Tailwind, and code Playground

by Outrora

Babel + JSX

const BASE_URL = 'https://a.lunes.io/wallet/staging';
async function verifyCoupon(coupon) {
  try {
    let endpoint = `${BASE_URL}/coupon/rescue/${coupon}`;
    let response = await fetch(endpoint);
    window.console.log(response);
  } catch(error) {
    window.console.log(error);
  }
}

verifyCoupon("1231-1234-1234-1234")