import { CREATE_CARD, FETCH_CARDS } from '../constants/card';

export function fetchCards(page) {
  return {
    type: FETCH_CARDS,
    api: true,
    auth: true,
    payload: {
      method: 'GET',
      url: '/cards/cards',
      params: { page }
    }
  };
}

export function createCard(data) {
  return {
    type: CREATE_CARD,
    api: true,
    auth: true,
    payload: {
      method: 'POST',
      url: '/cards/cards',
      data
    }
  };
}
