aboutsummaryrefslogtreecommitdiff
path: root/src/classes/client.js
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-10-01 19:48:06 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-10-01 19:48:06 +0530
commitfd5ed8aa4f159c8e1c0476915432e0a97a239a91 (patch)
tree42d3563472d9032c27f4e3a87dff85ec19362a94 /src/classes/client.js
parente4dbf70d561aa3ed79379ffdb98661cb3f215fe9 (diff)
fixed warning 'component changing controlled input to uncontrolled' while editing shipping addresses
Diffstat (limited to 'src/classes/client.js')
-rw-r--r--src/classes/client.js6
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())
+}