fix address

This commit is contained in:
Valentin CZERYBA 2024-06-30 14:48:48 +02:00
parent fbf2bd59bf
commit b13cb883ec
4 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ class _ItemMenuState extends State<ItemMenu> with ShowErrorDialog {
String former = "";
if (accessToken.isNotEmpty) {
var urlGet = Uri.parse("http://${globals.api}/events");
var urlGet = Uri.parse("${globals.api}/events");
var responseGet = await http.get(urlGet,
headers: {HttpHeaders.cookieHeader: 'access_token=${accessToken}'});

View File

@ -46,7 +46,7 @@ class _MyHomePageState extends State<ListItemMenu> {
var accessToken = prefs.getString("access_token") ?? "";
final List<Events> body = [];
if (accessToken.isNotEmpty) {
var url = Uri.parse("http://${globals.api}/events");
var url = Uri.parse("${globals.api}/events");
final response = await http.get(url, headers: {
"Content-Type": "application/json",
HttpHeaders.cookieHeader: "access_token=${accessToken}"

View File

@ -35,7 +35,7 @@ class _LoginDemoState extends State<LoginDemo> with ShowErrorDialog {
TextEditingController inputPseudo = TextEditingController();
TextEditingController inputPassword = TextEditingController();
Future<void> _login(BuildContext context) async {
var url = Uri.parse("https://${globals.api}/token");
var url = Uri.parse("${globals.api}/token");
var pseudo = inputPseudo.text;
var password = inputPassword.text;
print("get login");

View File

@ -1 +1 @@
String api = "backend.valczeryba.ovh";
String api = "https://backend.valczeryba.ovh";