Spaces:
Paused
Paused
Delete static/auth.js
Browse files- static/auth.js +0 -16
static/auth.js
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
function login() {
|
2 |
-
const username = document.getElementById('login-username').value;
|
3 |
-
const password = document.getElementById('login-password').value;
|
4 |
-
apiPost('/auth/login', { username, password })
|
5 |
-
.then(data => showResult('login-result', data))
|
6 |
-
.catch(err => console.error(err));
|
7 |
-
}
|
8 |
-
|
9 |
-
function changePassword() {
|
10 |
-
const username = document.getElementById('change-username').value;
|
11 |
-
const oldPassword = document.getElementById('old-password').value;
|
12 |
-
const newPassword = document.getElementById('new-password').value;
|
13 |
-
apiPost('/auth/change_password', { username, old_password: oldPassword, new_password: newPassword })
|
14 |
-
.then(data => showResult('change-password-result', data))
|
15 |
-
.catch(err => console.error(err));
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|