We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96acd15 commit fb0b2f0Copy full SHA for fb0b2f0
login.js
@@ -5,26 +5,6 @@ function setCookies(token) {
5
}
6
7
document.getElementById('login-btn').addEventListener('click', function() {
8
- let res = login();
9
- if(res){
10
- setCookies(res);
11
- window.location.replace("/soundboxBooking.html")
12
- }else{
13
- window.alert("network error");
14
- }
15
-});
16
-
17
-async function login(){
18
let url = "https://soundbox.v1an.xyz/login";
19
- try {
20
- const response = await fetch(url, {
21
- method: 'GET',
22
- credentials: 'include',
23
- });
24
- const result = await response.json();
25
- return result.toString();
26
- } catch (e) {
27
- console.error("Error on getting:", e);
28
- return null;
29
30
-}
+ window.location.replace(url);
+});
0 commit comments