fix: Login Check

This commit is contained in:
手瓜一十雪 committed 2024-12-13 17:38:27 +08:00
1 parent d59e5f2133
commit b86a28092a
5 files changed
+41 -46

No files matched your search

+2 -4
View File
@@ -1,5 +1,3 @@
import { request } from '@/utils/request.js';
import { EventSourcePolyfill } from 'event-source-polyfill';
type LogListItem = string;
type LogListData = LogListItem[];
@@ -15,7 +13,7 @@ export class LogManager {
}
public async GetLogList(): Promise<LogListData> {
try {
const ConfigResponse = await request(`${this.apiPrefix}/Log/GetLogList`, {
const ConfigResponse = await fetch(`${this.apiPrefix}/Log/GetLogList`, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + this.retCredential,
@@ -35,7 +33,7 @@ export class LogManager {
}
public async GetLog(FileName: string): Promise<string> {
try {
const ConfigResponse = await request(`${this.apiPrefix}/Log/GetLog?id=${FileName}`, {
const ConfigResponse = await fetch(`${this.apiPrefix}/Log/GetLog?id=${FileName}`, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + this.retCredential,