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