mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-05 15:38:34 +08:00
fix: 401 when getSettings
This commit is contained in:
@@ -100,6 +100,9 @@ const newEmail = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getSettings = async (jwt) => {
|
const getSettings = async (jwt) => {
|
||||||
|
if (typeof jwt != 'string' || jwt.trim() === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const response = await fetch(`${API_BASE}/api/settings`, {
|
const response = await fetch(`${API_BASE}/api/settings`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -112,6 +115,7 @@ const getSettings = async (jwt) => {
|
|||||||
message.error(`${response.status} ${await response.text()}` || "error");
|
message.error(`${response.status} ${await response.text()}` || "error");
|
||||||
console.error(response);
|
console.error(response);
|
||||||
address.value = "";
|
address.value = "";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let res = await response.json();
|
let res = await response.json();
|
||||||
address.value = res["address"];
|
address.value = res["address"];
|
||||||
|
|||||||
Reference in New Issue
Block a user