import { AsyncAjax } from "/core/Ajax.jsx";
export { AsyncAjax } from "/core/Ajax.jsx";

export const AsyncAuthAjax = {
  async get(url) {
    if(!store.get('account.token'))
      return false;

    return await AsyncAjax.get(url, {
      headers: {
        authorization: 'Bearer ' + store.get( 'account.token' )
      }
    })
  },
  async post(url, data) {
    if(!store.get('account.token'))
      return false;

    return await AsyncAjax.post(url, data, {
      headers: {
        authorization: 'Bearer ' + store.get( 'account.token' )
      }
    })
  }
};