From fd5ed8aa4f159c8e1c0476915432e0a97a239a91 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 1 Oct 2022 19:48:06 +0530 Subject: fixed warning 'component changing controlled input to uncontrolled' while editing shipping addresses --- src/classes/client.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/classes') diff --git a/src/classes/client.js b/src/classes/client.js index 20e0524..6785c90 100644 --- a/src/classes/client.js +++ b/src/classes/client.js @@ -64,3 +64,9 @@ export const getAllClients = (ok, fail) => { .then(res => ok(res.data)) .catch(err => fail(err)) } + +export const editClient = (client, ok, fail) => { + axios.put(`/client/${client.Id}`, client) + .then(res => ok()) + .catch(err => fail()) +} -- cgit v1.2.3