From 5ff6f879310e9217cb334400ae0f20dae00e1d0e Mon Sep 17 00:00:00 2001 From: CesarRivasP Date: Sun, 10 Feb 2019 10:45:31 -0400 Subject: [PATCH] Added deleteCustomer action --- src/actions/delete-customer.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/actions/delete-customer.js diff --git a/src/actions/delete-customer.js b/src/actions/delete-customer.js new file mode 100644 index 0000000..961c617 --- /dev/null +++ b/src/actions/delete-customer.js @@ -0,0 +1,11 @@ + +import { createAction } from 'redux-actions'; +import { apiDelete } from '../api'; +import { urlCustomers } from '../api/urls'; +import { DELETE_CUSTOMER } from '../constants'; + + +export const deleteCustomer = createAction( + DELETE_CUSTOMER, + (id) => apiDelete(urlCustomers, id)() +);