From c1335c1042a0fd8f86f3423e8ba64a9d61deb67a Mon Sep 17 00:00:00 2001 From: AlexTheGeek <28763288+AlexTheGeek@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:02:02 +0100 Subject: [PATCH] =?UTF-8?q?=C3=A7a=20me=20soule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/login.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/login.html b/templates/login.html index a74a246..d5342c5 100644 --- a/templates/login.html +++ b/templates/login.html @@ -79,7 +79,12 @@

OU

getUserProfile(); $('form').submit(function (e) { e.preventDefault(); - + + {% if config['URL_API'] %} + var config = {}; + config.URL_API = String(config['URL_API']); + console.log(config.URL_API); + {% endif %} var formData = { email: $('#email').val(), password: $('#password').val() @@ -87,9 +92,7 @@

OU

$.ajax({ type: 'POST', - {% if config['URL_API'] %} - url: String(config['URL_API'])+"/login", - {% endif %} + url: config.URL_API+"/login", contentType: 'application/json;charset=UTF-8', data: JSON.stringify(formData), xhrFields: {