diff options
| author | Haishan <[email protected]> | 2020-08-01 21:05:45 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-08-01 21:05:45 +0800 |
| commit | 941224c13ba87d2c3f36fb86652f046a5c76e00d (patch) | |
| tree | ddef119eb6b230378ae87d7631f249dde78e1bf9 /src/api | |
| parent | 9b3f996c2971c97933cc776b1a10e27d22442fff (diff) | |
build: fix buildv0.2.2
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/version.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/version.ts b/src/api/version.ts index eb8a86c..78ceb83 100644 --- a/src/api/version.ts +++ b/src/api/version.ts @@ -2,7 +2,7 @@ import { getURLAndInit } from 'src/misc/request-helper'; import { ClashAPIConfig } from 'src/types'; type VersionData = { - version: string; + version?: string; premium?: boolean; }; @@ -10,7 +10,7 @@ export async function fetchVersion( endpoint: string, apiConfig: ClashAPIConfig ): Promise<VersionData> { - let json = { rules: [] }; + let json = {}; try { const { url, init } = getURLAndInit(apiConfig); const res = await fetch(url + endpoint, init); |
