aboutsummaryrefslogtreecommitdiff
path: root/src/classes/brand.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/brand.js')
-rw-r--r--src/classes/brand.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/classes/brand.js b/src/classes/brand.js
index 48bc974..967f9a1 100644
--- a/src/classes/brand.js
+++ b/src/classes/brand.js
@@ -32,9 +32,9 @@ export class Brand {
}
export const deleteBrand = (id, ok, fail) => {
- axios.delete(`/brand/${id}`)
- .then(res => ok())
- .catch(err => fail())
+ axios.delete(`/brand/${id}`)
+ .then(res => ok())
+ .catch(err => fail())
}
export const getAllBrands = (ok, fail) => {
@@ -42,3 +42,9 @@ export const getAllBrands = (ok, fail) => {
.then(res => ok(res.data))
.catch(err => fail())
}
+
+export const saveBrand = (brand, ok, fail) => {
+ axios.post("/brand/new", brand)
+ .then(res => ok())
+ .catch((err) => fail())
+}