diff --git a/fronted/aplicacionrutasturisticas/lib/config/dio.dart b/fronted/aplicacionrutasturisticas/lib/config/dio.dart index 501bfac257fb38be7789ec098f04e3e12be3dbe4..5bc2d6d6b9f31632a2c42e852d2160b9ec0ff64b 100644 --- a/fronted/aplicacionrutasturisticas/lib/config/dio.dart +++ b/fronted/aplicacionrutasturisticas/lib/config/dio.dart @@ -13,4 +13,15 @@ void Registro_Datos(String nombre, String lastname, String email, "email": email, }); print(response.data.toString()); + + +} +void loginDatos(String email, String password) async { + Response responselogin; + responselogin = await dio.post("http://192.168.1.81:3000/auth-user/login", data: { + "email": email, + "password": password, + }); + print(responselogin.data.toString()); } + diff --git a/fronted/aplicacionrutasturisticas/lib/pages/login.dart b/fronted/aplicacionrutasturisticas/lib/pages/login.dart index 2df5bed76388c689398f5d736a3e72d32bc44749..0a042391f8139b980aeda4f31690678b68a34cbf 100644 --- a/fronted/aplicacionrutasturisticas/lib/pages/login.dart +++ b/fronted/aplicacionrutasturisticas/lib/pages/login.dart @@ -1,3 +1,4 @@ +import 'package:aplicacionrutasturisticas/config/dio.dart'; import 'package:aplicacionrutasturisticas/utilerias/TextButtons.dart'; import 'package:flutter/material.dart'; @@ -78,6 +79,7 @@ class _TextFielEjemploState extends State { corr = correo.text; pass = password.text; print(corr + " " + pass); + loginDatos(corr, pass); } void botonRegistrar() {