@@ -11,7 +11,7 @@ class CategoriaIngredientesService
1111 public function __construct ()
1212 {
1313 // Obtiene la URL base de la API desde el archivo .env
14- $ this ->baseUrl = env ('API_BASE_URL ' , 'http://44.195.189.38 ' );
14+ $ this ->baseUrl = env ('API_BASE_URL ' , 'http://32.193.167.191 ' );
1515 }
1616
1717 /**
@@ -28,7 +28,7 @@ protected function getApiClient()
2828 // =========================================================================
2929
3030 /**
31- * Obtiene el listado de categorías de ingredientes desde la API.
31+ * Obtiene el listado de categorÃas de ingredientes desde la API.
3232 * @return array Retorna un array con 'success' y 'data' o 'error'.
3333 */
3434 public function obtenerCategoriasIngredientes (): array
@@ -45,7 +45,7 @@ public function obtenerCategoriasIngredientes(): array
4545
4646 return [
4747 'success ' => false ,
48- 'error ' => $ response ->json ()['error ' ] ?? 'Error desconocido al obtener categorías ( ' . $ response ->status () . ') '
48+ 'error ' => $ response ->json ()['error ' ] ?? 'Error desconocido al obtener categorÃas ( ' . $ response ->status () . ') '
4949 ];
5050
5151 } catch (\Exception $ e ) {
@@ -61,7 +61,7 @@ public function obtenerCategoriasIngredientes(): array
6161 // =========================================================================
6262
6363 /**
64- * Crea una nueva categoría de ingrediente.
64+ * Crea una nueva categorÃa de ingrediente.
6565 * @param array $data Array con nombreCategoria.
6666 */
6767 public function crearCategoriaIngrediente (array $ data ): array
@@ -82,13 +82,13 @@ public function crearCategoriaIngrediente(array $data): array
8282
8383 return [
8484 'success ' => false ,
85- 'error ' => $ response ->json ()['error ' ] ?? 'Error al crear la categoría ( ' . $ response ->status () . ') '
85+ 'error ' => $ response ->json ()['error ' ] ?? 'Error al crear la categorÃa ( ' . $ response ->status () . ') '
8686 ];
8787
8888 } catch (\Exception $ e ) {
8989 return [
9090 'success ' => false ,
91- 'error ' => 'Fallo de conexión al intentar crear: ' . $ e ->getMessage ()
91+ 'error ' => 'Fallo de conexión al intentar crear: ' . $ e ->getMessage ()
9292 ];
9393 }
9494 }
@@ -98,7 +98,7 @@ public function crearCategoriaIngrediente(array $data): array
9898 // =========================================================================
9999
100100 /**
101- * Actualiza una categoría de ingrediente existente por ID.
101+ * Actualiza una categorÃa de ingrediente existente por ID.
102102 */
103103 public function actualizarCategoriaIngrediente (int $ id , array $ data ): array
104104 {
@@ -118,13 +118,13 @@ public function actualizarCategoriaIngrediente(int $id, array $data): array
118118
119119 return [
120120 'success ' => false ,
121- 'error ' => $ response ->json ()['error ' ] ?? 'Error al actualizar la categoría ( ' . $ response ->status () . ') '
121+ 'error ' => $ response ->json ()['error ' ] ?? 'Error al actualizar la categorÃa ( ' . $ response ->status () . ') '
122122 ];
123123
124124 } catch (\Exception $ e ) {
125125 return [
126126 'success ' => false ,
127- 'error ' => 'Fallo de conexión al intentar actualizar: ' . $ e ->getMessage ()
127+ 'error ' => 'Fallo de conexión al intentar actualizar: ' . $ e ->getMessage ()
128128 ];
129129 }
130130 }
@@ -134,7 +134,7 @@ public function actualizarCategoriaIngrediente(int $id, array $data): array
134134 // =========================================================================
135135
136136 /**
137- * Elimina una categoría de ingrediente por ID.
137+ * Elimina una categorÃa de ingrediente por ID.
138138 */
139139 public function eliminarCategoriaIngrediente (int $ id ): array
140140 {
@@ -150,13 +150,13 @@ public function eliminarCategoriaIngrediente(int $id): array
150150
151151 return [
152152 'success ' => false ,
153- 'error ' => $ response ->json ()['error ' ] ?? 'Error al eliminar la categoría ( ' . $ response ->status () . ') '
153+ 'error ' => $ response ->json ()['error ' ] ?? 'Error al eliminar la categorÃa ( ' . $ response ->status () . ') '
154154 ];
155155
156156 } catch (\Exception $ e ) {
157157 return [
158158 'success ' => false ,
159- 'error ' => 'Fallo de conexión al intentar eliminar: ' . $ e ->getMessage ()
159+ 'error ' => 'Fallo de conexión al intentar eliminar: ' . $ e ->getMessage ()
160160 ];
161161 }
162162 }
0 commit comments