Update login.js to use Bearer on header

This commit is contained in:
Dita Aji Pratama 2025-03-10 14:17:24 +07:00
parent 2be2f425c6
commit 7f77ad39bf

View File

@ -32,16 +32,14 @@ function responseSession(response) {
function setSession(jwt) {
var url = "/api/auth/session/set";
var payload = {
"jwt" : jwt
};
var payload = {};
sendHttpRequest(url, "POST", payload, function (error, response) {
if (error) console.error("Error:", error);
else {
console.log("JSON Response:", response);
responseSession(response);
}
}, "application/json");
}, "application/json", `Bearer ${jwt}`);
}
function responseAlert(response) {