import { UPLOAD_IMAGE } from '../constants/image';

export function uploadImage(image) {
  const formData = new FormData();
  formData.append('upload', image);

  return {
    type: UPLOAD_IMAGE,
    api: true,
    auth: true,
    payload: {
      method: 'POST',
      url: '/upload',
      data: formData
    }
  };
}
