|
|
@@ -83,7 +83,7 @@
|
|
|
redirect: 'follow'
|
|
|
};
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/product/create', requestOptions)
|
|
|
+ fetch('https://bartender.mixtab.com.br/product/create', requestOptions)
|
|
|
.then((response) => response.json())
|
|
|
.then((res) => {
|
|
|
if (res.status === 'ok') {
|
|
|
@@ -100,7 +100,7 @@
|
|
|
description_text: productFormData.description
|
|
|
};
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/description/create', {
|
|
|
+ fetch('https://bartender.mixtab.com.br/description/create', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
@@ -173,7 +173,10 @@
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
- const response = await fetch('https://dev2.mixtech.dev.br/product/update', requestOptions);
|
|
|
+ const response = await fetch(
|
|
|
+ 'https://bartender.mixtab.com.br/product/update',
|
|
|
+ requestOptions
|
|
|
+ );
|
|
|
const result = await response.json();
|
|
|
|
|
|
if (result.status === 'ok' && productFormData.description != '') {
|
|
|
@@ -185,7 +188,7 @@
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
- const descRes = await fetch('https://dev2.mixtech.dev.br/description/update', {
|
|
|
+ const descRes = await fetch('https://bartender.mixtab.com.br/description/update', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
@@ -241,7 +244,7 @@
|
|
|
redirect: 'follow'
|
|
|
};
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/category/create', requestOptions)
|
|
|
+ fetch('https://bartender.mixtab.com.br/category/create', requestOptions)
|
|
|
.then((response) => response.json())
|
|
|
.then((res) => {
|
|
|
if (res.status === 'ok') {
|
|
|
@@ -267,7 +270,7 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/category/delete', {
|
|
|
+ fetch('https://bartender.mixtab.com.br/category/delete', {
|
|
|
method: 'POST',
|
|
|
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
|
|
|
body: JSON.stringify({
|
|
|
@@ -302,7 +305,7 @@
|
|
|
redirect: 'follow'
|
|
|
};
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/product/delete', requestOptions)
|
|
|
+ fetch('https://bartender.mixtab.com.br/product/delete', requestOptions)
|
|
|
.then((response) => response.json())
|
|
|
.then((res) => {
|
|
|
if (res.status === 'ok') {
|
|
|
@@ -328,7 +331,7 @@
|
|
|
body: JSON.stringify({ company_id: company })
|
|
|
};
|
|
|
|
|
|
- fetch('https://dev2.mixtech.dev.br/category/get', requestOptions)
|
|
|
+ fetch('https://bartender.mixtab.com.br/category/get', requestOptions)
|
|
|
.then((response) => response.json())
|
|
|
.then((res) => {
|
|
|
if (res.status === 'ok') {
|
|
|
@@ -337,7 +340,7 @@
|
|
|
name: categorie.category_name
|
|
|
}));
|
|
|
|
|
|
- return fetch('https://dev2.mixtech.dev.br/product/get', requestOptions);
|
|
|
+ return fetch('https://bartender.mixtab.com.br/product/get', requestOptions);
|
|
|
} else {
|
|
|
throw new Error(`Erro ao carregar categorias: ${res.msg}`);
|
|
|
}
|