Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
test login
Browse files Browse the repository at this point in the history
  • Loading branch information
elouanjef committed Feb 1, 2024
1 parent 790d563 commit 3237707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def home():

@app.route('/login', methods=['GET', 'POST'])
def login():
return render_template('login.html')
return render_template('login.html', app.config['URL_API'])

@app.route('/admin', methods=['GET', 'POST'])
def admin():
Expand Down
3 changes: 2 additions & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ <h1 class="mb-0">OU</h1>
});

$(document).ready(function () {
var URL_API = "{{ URL_API }}";

getUserProfile();
$('form').submit(function (e) {
Expand All @@ -87,7 +88,7 @@ <h1 class="mb-0">OU</h1>

$.ajax({
type: 'POST',
url: "https://api.insa-cvl.com/login",
url: URL_API + "/login",
contentType: 'application/json;charset=UTF-8',
data: JSON.stringify(formData),
xhrFields: {
Expand Down

0 comments on commit 3237707

Please sign in to comment.