diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-01 19:48:06 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-01 19:48:06 +0530 |
commit | fd5ed8aa4f159c8e1c0476915432e0a97a239a91 (patch) | |
tree | 42d3563472d9032c27f4e3a87dff85ec19362a94 /src/classes | |
parent | e4dbf70d561aa3ed79379ffdb98661cb3f215fe9 (diff) |
fixed warning 'component changing controlled input to uncontrolled' while editing shipping addresses
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/client.js | 6 |
1 files changed, 6 insertions, 0 deletions
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()) +} |