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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Sep 12, 2024
1 parent acc3f36 commit d26f66e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const elm_editor_dark = document.querySelector(".editor_dark");
const APP_URL = "https://auth.salamlang.ir";
const APP_URL_VERIFY_TOKEN = APP_URL + "/api/v1/verify_token";
const APP_URL_SAVE = APP_URL + "/api/v1/codes/save";
const APP_URL_GET_CODE = APP_URL + "/api/v1/code";
const APP_URL_GET_CODE = APP_URL + "/api/v1/code/"; // + @uuid

// Variables
let token;
Expand Down Expand Up @@ -508,7 +508,6 @@ window.addEventListener('load', () => {
const xhr = new XMLHttpRequest();
xhr.onload = () => {
const obj = JSON.parse(xhr.response);
console.log("Get code: ", obj);
if (obj.status === true) {
elm_code.value = obj.data.code.trim();
} else {
Expand All @@ -517,7 +516,7 @@ window.addEventListener('load', () => {
}
}
};
xhr.open("GET", APP_URL_GET_CODE);
xhr.open("GET", APP_URL_GET_CODE + codeParam);
xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
xhr.setRequestHeader('Authorization', token);
xhr.send();
Expand Down

0 comments on commit d26f66e

Please sign in to comment.