diff --git a/senhor-sorvete/src/Components/CarrosselImagens/index.jsx b/senhor-sorvete/src/Components/CarrosselImagens/index.jsx index 5009e2d..2c74e3c 100644 --- a/senhor-sorvete/src/Components/CarrosselImagens/index.jsx +++ b/senhor-sorvete/src/Components/CarrosselImagens/index.jsx @@ -18,7 +18,7 @@ export default function BasicDemo() { useEffect(() => { const fetchRecomendacoes = async () => { try { - const response = await axios.get("http://10.0.0.26:80/api/produtos/recomendacao") + const response = await axios.get("http://50.19.70.8:80/api/produtos/recomendacao") setRecomendacoes(response.data); } catch (error) { console.error("Erro ao buscar recomendacoes:", error); diff --git a/senhor-sorvete/src/Components/ModalAdicionarFornecedor/index.jsx b/senhor-sorvete/src/Components/ModalAdicionarFornecedor/index.jsx index e0bfbf3..c61aad3 100644 --- a/senhor-sorvete/src/Components/ModalAdicionarFornecedor/index.jsx +++ b/senhor-sorvete/src/Components/ModalAdicionarFornecedor/index.jsx @@ -34,7 +34,7 @@ const ModalAdicionarFornecedor = ({ } try { - const response = await fetch('http://10.0.0.26:80/api/fornecedores', { + const response = await fetch('http://50.19.70.8:80/api/fornecedores', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/senhor-sorvete/src/Components/ModalEditarLote/index.jsx b/senhor-sorvete/src/Components/ModalEditarLote/index.jsx index 4461bb4..dbf6e0e 100644 --- a/senhor-sorvete/src/Components/ModalEditarLote/index.jsx +++ b/senhor-sorvete/src/Components/ModalEditarLote/index.jsx @@ -35,7 +35,7 @@ const ModalEditarProduto = ({ debugger try { await axios.patch( - `http://10.0.0.26:80/api/lotes/${idLote}`, + `http://50.19.70.8:80/api/lotes/${idLote}`, corpoParaAtualizarStatus, { headers: { diff --git a/senhor-sorvete/src/Components/ModalGerenciamento/index.jsx b/senhor-sorvete/src/Components/ModalGerenciamento/index.jsx index 1cbed3f..28002c3 100644 --- a/senhor-sorvete/src/Components/ModalGerenciamento/index.jsx +++ b/senhor-sorvete/src/Components/ModalGerenciamento/index.jsx @@ -63,7 +63,7 @@ const ModalGerenciamento = ({ const buscarProdutos = async () => { const token = sessionStorage.getItem('token'); try { - const response = await axios.get('http://10.0.0.26:80/api/produtos', { + const response = await axios.get('http://50.19.70.8:80/api/produtos', { headers: { Authorization: `Bearer ${token}` } diff --git a/senhor-sorvete/src/Pages/ADM/Dashboard/index.jsx b/senhor-sorvete/src/Pages/ADM/Dashboard/index.jsx index 60940cf..9d12398 100644 --- a/senhor-sorvete/src/Pages/ADM/Dashboard/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/Dashboard/index.jsx @@ -81,7 +81,7 @@ const Dashboard = () => { const fetchGerarCsv = async () => { const token = sessionStorage.getItem("token"); try { - const response = await fetch('http://10.0.0.26:80/api/csv/download', { + const response = await fetch('http://50.19.70.8:80/api/csv/download', { method: 'GET', headers: { Authorization: `Bearer ${token}`, @@ -125,7 +125,7 @@ const Dashboard = () => { setError(null); try { - const response = await fetch("http://10.0.0.26:80/api/dashboard/", { + const response = await fetch("http://50.19.70.8:80/api/dashboard/", { method: "GET", headers: { Authorization: `Bearer ${token}`, diff --git a/senhor-sorvete/src/Pages/ADM/Destaque/index.jsx b/senhor-sorvete/src/Pages/ADM/Destaque/index.jsx index f09f97f..d5aa762 100644 --- a/senhor-sorvete/src/Pages/ADM/Destaque/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/Destaque/index.jsx @@ -34,7 +34,7 @@ const Destaque = () => { // Função para buscar o produto recomendado const fetchProdutoRecomendado = async (token) => { try { - const response = await axios.get('http://10.0.0.26:80/api/produtos/destaque', { + const response = await axios.get('http://50.19.70.8:80/api/produtos/destaque', { headers: { 'Authorization': `Bearer ${token}` } }); @@ -60,7 +60,7 @@ const Destaque = () => { // Função para buscar todos os produtos const fetchTodosProdutos = async (token) => { try { - const response = await axios.get('http://10.0.0.26:80/api/produtos', { + const response = await axios.get('http://50.19.70.8:80/api/produtos', { headers: { 'Authorization': `Bearer ${token}` } }); @@ -122,7 +122,7 @@ const Destaque = () => { } try { - const response = await fetch(`http://10.0.0.26:80/api/produtos/destaque`, { + const response = await fetch(`http://50.19.70.8:80/api/produtos/destaque`, { method: "PUT", headers: { 'Content-Type': 'application/json', diff --git a/senhor-sorvete/src/Pages/ADM/Estoque/index.jsx b/senhor-sorvete/src/Pages/ADM/Estoque/index.jsx index a01e423..0c300c9 100644 --- a/senhor-sorvete/src/Pages/ADM/Estoque/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/Estoque/index.jsx @@ -60,7 +60,7 @@ const Estoque = () => { const fetchEstoque = async () => { const token = sessionStorage.getItem('token'); try { - const response = await axios.get('http://10.0.0.26:80/api/produtos', { + const response = await axios.get('http://50.19.70.8:80/api/produtos', { headers: { Authorization: `Bearer ${token}` } @@ -78,7 +78,7 @@ const Estoque = () => { // const baixarRelatorioExcel = async () => { // const token = sessionStorage.getItem('token'); // try { - // await axios.get('http://10.0.0.26:80/api/relatorio', { + // await axios.get('http://50.19.70.8:80/api/relatorio', { // headers: { // Authorization: `Bearer ${token}` // } @@ -93,7 +93,7 @@ const Estoque = () => { const token = sessionStorage.getItem('token'); try { - const response = await axios.get('http://10.0.0.26:80/api/relatorio', { + const response = await axios.get('http://50.19.70.8:80/api/relatorio', { headers: { Authorization: `Bearer ${token}` }, @@ -126,7 +126,7 @@ const Estoque = () => { const abrirModalAdicionarLote = async () => { const token = sessionStorage.getItem('token'); try { - const response = await axios.get('http://10.0.0.26:80/api/fornecedores', { + const response = await axios.get('http://50.19.70.8:80/api/fornecedores', { headers: { Authorization: `Bearer ${token}` } @@ -221,7 +221,7 @@ const Estoque = () => { }; try { - await axios.post('http://10.0.0.26:80/api/lotes', jsonParaCriarLote, { + await axios.post('http://50.19.70.8:80/api/lotes', jsonParaCriarLote, { headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' @@ -232,7 +232,7 @@ const Estoque = () => { fecharModalAdicionarLote(); // Atualiza a lista de produtos - const response = await axios.get('http://10.0.0.26:80/api/produtos', { + const response = await axios.get('http://50.19.70.8:80/api/produtos', { headers: { Authorization: `Bearer ${token}` } diff --git a/senhor-sorvete/src/Pages/ADM/ProdutoEstoque/index.jsx b/senhor-sorvete/src/Pages/ADM/ProdutoEstoque/index.jsx index b8edbf4..ca60321 100644 --- a/senhor-sorvete/src/Pages/ADM/ProdutoEstoque/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/ProdutoEstoque/index.jsx @@ -33,7 +33,7 @@ const ProdutoEstoque = () => { const fetchEstoque = async () => { const token = sessionStorage.getItem('token'); try { - const response = await axios.get(`http://10.0.0.26:80/api/lotes/produtos/${id}`, { + const response = await axios.get(`http://50.19.70.8:80/api/lotes/produtos/${id}`, { headers: { Authorization: `Bearer ${token}` } @@ -90,7 +90,7 @@ const ProdutoEstoque = () => { const handleDeletar = async () => { const token = sessionStorage.getItem("token"); try { - await axios.delete(`http://10.0.0.26:80/api/lotes/${idLote}`, { + await axios.delete(`http://50.19.70.8:80/api/lotes/${idLote}`, { headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", diff --git a/senhor-sorvete/src/Pages/ADM/Recomendacoes/index.jsx b/senhor-sorvete/src/Pages/ADM/Recomendacoes/index.jsx index c640ba6..6cbb76a 100644 --- a/senhor-sorvete/src/Pages/ADM/Recomendacoes/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/Recomendacoes/index.jsx @@ -64,7 +64,7 @@ const Recomendacoes = () => { const token = sessionStorage.getItem('token'); try { // Buscar todos os Produtos - const resposta = await fetch('http://10.0.0.26:80/api/produtos/ativos', { + const resposta = await fetch('http://50.19.70.8:80/api/produtos/ativos', { headers: { Authorization: `Bearer ${token}` } @@ -102,7 +102,7 @@ const Recomendacoes = () => { setCarregando(true); try { // Buscar todos os Produtos - const resposta = await fetch('http://10.0.0.26:80/api/produtos/recomendacao', { + const resposta = await fetch('http://50.19.70.8:80/api/produtos/recomendacao', { headers: { Authorization: `Bearer ${token}` } @@ -161,7 +161,7 @@ const Recomendacoes = () => { const atualizarRecomendacao = JSON.parse(JSON.stringify({ produtoId: produto.id })); - const resposta = await fetch(`http://10.0.0.26:80/api/produtos/recomendacao/${idRecomendacao}`, { + const resposta = await fetch(`http://50.19.70.8:80/api/produtos/recomendacao/${idRecomendacao}`, { method: "PUT", headers: { 'Content-Type': 'application/json', @@ -208,9 +208,9 @@ const Recomendacoes = () => { setCarregando(true); try { const urls = [ - { key: "marcas", url: "http://10.0.0.26:80/api/marcas" }, - { key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" }, - { key: "tipos", url: "http://10.0.0.26:80/api/tipos" } + { key: "marcas", url: "http://50.19.70.8:80/api/marcas" }, + { key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" }, + { key: "tipos", url: "http://50.19.70.8:80/api/tipos" } ]; const respostas = await Promise.all( @@ -306,7 +306,7 @@ const Recomendacoes = () => { .normalize("NFD") .replace(/[\u0300-\u036f]/g, ""); - const response = await fetch(`http://10.0.0.26:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, { + const response = await fetch(`http://50.19.70.8:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, { headers: { Authorization: `Bearer ${token}` } diff --git a/senhor-sorvete/src/Pages/ADM/Saidas/saidas.jsx b/senhor-sorvete/src/Pages/ADM/Saidas/saidas.jsx index 5324404..0a25af0 100644 --- a/senhor-sorvete/src/Pages/ADM/Saidas/saidas.jsx +++ b/senhor-sorvete/src/Pages/ADM/Saidas/saidas.jsx @@ -96,7 +96,7 @@ const Saidas = () => { } axios - .get("http://10.0.0.26:80/api/saidas-estoque", { + .get("http://50.19.70.8:80/api/saidas-estoque", { headers: { Authorization: `Bearer ${token}`, }, @@ -118,7 +118,7 @@ const Saidas = () => { const token = sessionStorage.getItem("token"); try { - const response = await axios.get("http://10.0.0.26:80/api/produtos", { + const response = await axios.get("http://50.19.70.8:80/api/produtos", { headers: { Authorization: `Bearer ${token}`, }, @@ -257,7 +257,7 @@ const Saidas = () => { saidaEstoques: saida, }; - await axios.post("http://10.0.0.26:80/api/saidas-estoque", saidaEstoque, { + await axios.post("http://50.19.70.8:80/api/saidas-estoque", saidaEstoque, { headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", @@ -285,7 +285,7 @@ const Saidas = () => { try { const dataFormatada = dataBusca; - const response = await axios.get("http://10.0.0.26:80/api/saidas-estoque/data", { + const response = await axios.get("http://50.19.70.8:80/api/saidas-estoque/data", { params: { data: dataFormatada }, headers: { Authorization: `Bearer ${token}`, @@ -326,7 +326,7 @@ const Saidas = () => { } try { - await axios.put(`http://10.0.0.26:80/api/saidas-estoque/${saidaEditada.id}`, saidaEditada, { + await axios.put(`http://50.19.70.8:80/api/saidas-estoque/${saidaEditada.id}`, saidaEditada, { headers: { Authorization: `Bearer ${token}`, }, @@ -360,7 +360,7 @@ const Saidas = () => { const token = sessionStorage.getItem("token"); try { - const response = await axios.get("http://10.0.0.26:80/api/produtos", { + const response = await axios.get("http://50.19.70.8:80/api/produtos", { headers: { Authorization: `Bearer ${token}`, }, @@ -392,7 +392,7 @@ const Saidas = () => { }; try { - await axios.delete("http://10.0.0.26:80/api/saidas-estoque", { + await axios.delete("http://50.19.70.8:80/api/saidas-estoque", { data: saidaEstoque, // o body da requisição headers: { Authorization: `Bearer ${token}`, diff --git a/senhor-sorvete/src/Pages/ADM/listarProdutos/index.jsx b/senhor-sorvete/src/Pages/ADM/listarProdutos/index.jsx index fa89848..48e11dd 100644 --- a/senhor-sorvete/src/Pages/ADM/listarProdutos/index.jsx +++ b/senhor-sorvete/src/Pages/ADM/listarProdutos/index.jsx @@ -72,7 +72,7 @@ const ListarProdutos = () => { setCarregando(true); try { // Buscar todos os Produtos - const resposta = await fetch('http://10.0.0.26:80/api/produtos', { + const resposta = await fetch('http://50.19.70.8:80/api/produtos', { headers: { Authorization: `Bearer ${token}` } @@ -126,7 +126,7 @@ const ListarProdutos = () => { } try { - const response = await fetch('http://10.0.0.26:80/api/marcas', { + const response = await fetch('http://50.19.70.8:80/api/marcas', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -178,7 +178,7 @@ const ListarProdutos = () => { } try { - const response = await fetch('http://10.0.0.26:80/api/tipos', { + const response = await fetch('http://50.19.70.8:80/api/tipos', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -236,7 +236,7 @@ const ListarProdutos = () => { } try { - const response = await fetch('http://10.0.0.26:80/api/subtipos', { + const response = await fetch('http://50.19.70.8:80/api/subtipos', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -265,7 +265,7 @@ const ListarProdutos = () => { }; // const obterTokenSasAzure = async () => { // const token = sessionStorage.getItem('token'); - // const resposta = await fetch('http://10.0.0.26:80/api/azure', { + // const resposta = await fetch('http://50.19.70.8:80/api/azure', { // method: 'GET', // headers: { // 'Authorization': `Bearer ${token}` @@ -316,7 +316,7 @@ const ListarProdutos = () => { .normalize("NFD") .replace(/[\u0300-\u036f]/g, ""); - const response = await fetch(`http://10.0.0.26:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, { + const response = await fetch(`http://50.19.70.8:80/api/produtos/filtrar-nome-marca?termo=${termoNormalizado}`, { headers: { Authorization: `Bearer ${token}` } @@ -364,9 +364,9 @@ const ListarProdutos = () => { setCarregando(true); try { const urls = [ - { key: "marcas", url: "http://10.0.0.26:80/api/marcas" }, - { key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" }, - { key: "tipos", url: "http://10.0.0.26:80/api/tipos" } + { key: "marcas", url: "http://50.19.70.8:80/api/marcas" }, + { key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" }, + { key: "tipos", url: "http://50.19.70.8:80/api/tipos" } ]; const respostas = await Promise.all( @@ -653,7 +653,7 @@ const ListarProdutos = () => { temLactose: typeof novoProduto.temLactose === "boolean" ? novoProduto.temLactose : false, temGluten: typeof novoProduto.temGluten === "boolean" ? novoProduto.temGluten : false }; - const resposta = await fetch('http://10.0.0.26:80/api/produtos', { + const resposta = await fetch('http://50.19.70.8:80/api/produtos', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, @@ -733,7 +733,7 @@ const ListarProdutos = () => { imagemUrl: urlImagem }; - const resposta = await fetch(`http://10.0.0.26:80/api/produtos/${produto.id}`, { + const resposta = await fetch(`http://50.19.70.8:80/api/produtos/${produto.id}`, { method: "PUT", headers: { 'Content-Type': 'application/json', @@ -811,9 +811,9 @@ const ListarProdutos = () => { setCarregando(true); try { const urls = [ - { key: "marcas", url: "http://10.0.0.26:80/api/marcas" }, - { key: "subtipos", url: "http://10.0.0.26:80/api/subtipos" }, - { key: "tipos", url: "http://10.0.0.26:80/api/tipos" } + { key: "marcas", url: "http://50.19.70.8:80/api/marcas" }, + { key: "subtipos", url: "http://50.19.70.8:80/api/subtipos" }, + { key: "tipos", url: "http://50.19.70.8:80/api/tipos" } ]; const respostas = await Promise.all( @@ -867,7 +867,7 @@ const ListarProdutos = () => { const token = sessionStorage.getItem('token'); const isAtivoGenerico = !produto.isAtivo; // Inverte o status atual try { - const response = await fetch(`http://10.0.0.26:80/api/produtos/ativar/${produto.id}?isAtivo=${isAtivoGenerico}`, { + const response = await fetch(`http://50.19.70.8:80/api/produtos/ativar/${produto.id}?isAtivo=${isAtivoGenerico}`, { method: "PATCH", headers: { 'Content-Type': 'application/json', diff --git a/senhor-sorvete/src/Pages/Cardapio/cardapio.jsx b/senhor-sorvete/src/Pages/Cardapio/cardapio.jsx index 999dae5..2d91d9e 100644 --- a/senhor-sorvete/src/Pages/Cardapio/cardapio.jsx +++ b/senhor-sorvete/src/Pages/Cardapio/cardapio.jsx @@ -38,7 +38,7 @@ const Cardapio = () => { setIsLoading(true); try { const response = await axios.get( - "http://10.0.0.26:80/api/produtos/ativos" + "http://50.19.70.8:80/api/produtos/ativos" ); setProdutos(response.data); } catch (error) { @@ -57,7 +57,7 @@ const Cardapio = () => { // const fetchPopular = async () => { // setIsLoadingPopular(true); // try { - // const response = await axios.get("http://10.0.0.26:80/api/produtos/populares"); + // const response = await axios.get("http://50.19.70.8:80/api/produtos/populares"); // if (response.status === 200) { // const popularProductsWithFullData = response.data.map(popularProduct => { // const fullProductDetails = produtos.find( @@ -104,7 +104,7 @@ const Cardapio = () => { // const fetchPopular = async () => { // setIsLoadingPopular(true); // Ativa o estado de carregamento // try { - // const response = await axios.get("http://10.0.0.26:80/api/produtos/populares"); + // const response = await axios.get("http://50.19.70.8:80/api/produtos/populares"); // if (response.status === 200) { // setPopular(response.data); // setIsPopularToggled(!isPopularToggled); @@ -131,7 +131,7 @@ const Cardapio = () => { // const reserva = cartItems.map(async (item) => { // try { - // const response = await axios.post("http://10.0.0.26:80/api/notificacoes", { + // const response = await axios.post("http://50.19.70.8:80/api/notificacoes", { // email, // idProduto: item.id, // }); diff --git a/senhor-sorvete/src/Pages/Home/index.jsx b/senhor-sorvete/src/Pages/Home/index.jsx index a768f4a..432db21 100644 --- a/senhor-sorvete/src/Pages/Home/index.jsx +++ b/senhor-sorvete/src/Pages/Home/index.jsx @@ -25,7 +25,7 @@ const Home = (props) => { const fetchDestaque = async () => { try { const resposta = await fetch( - "http://10.0.0.26:80/api/produtos/destaque", + "http://50.19.70.8:80/api/produtos/destaque", { method: "GET", headers: { @@ -51,7 +51,7 @@ const Home = (props) => { // const fetchDestaqueDia = async () => { // try { - // const resposta = await fetch("http://10.0.0.26:80/api/produtos/destaque", { + // const resposta = await fetch("http://50.19.70.8:80/api/produtos/destaque", { // method: "GET", // headers: { // Accept: "*/*", diff --git a/senhor-sorvete/src/Pages/Login/index.jsx b/senhor-sorvete/src/Pages/Login/index.jsx index 892e92f..b5aa8a9 100644 --- a/senhor-sorvete/src/Pages/Login/index.jsx +++ b/senhor-sorvete/src/Pages/Login/index.jsx @@ -20,7 +20,7 @@ const Login = () => { // Realiza a validação das informações axios - .post("http://10.0.0.26:80/api/usuarios/login", { + .post("http://50.19.70.8:80/api/usuarios/login", { email: email, senha: senha, })