mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-30 08:22:34 +00:00
fix(openai): satisfy Live CI checks
This commit is contained in:
@@ -16,6 +16,11 @@ import type {
|
||||
PaginatedResponse
|
||||
} from '@/types'
|
||||
|
||||
export interface LiveCapability {
|
||||
supported: boolean
|
||||
reason?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* List all groups with pagination
|
||||
* @param page - Page number (default: 1)
|
||||
@@ -81,6 +86,12 @@ export async function getByPlatform(platform: GroupPlatform): Promise<AdminGroup
|
||||
return getAll(platform)
|
||||
}
|
||||
|
||||
/** 获取当前 Sub2API 服务端的 Live 运行环境能力。 */
|
||||
export async function getLiveCapability(): Promise<LiveCapability> {
|
||||
const { data } = await apiClient.get<LiveCapability>('/admin/groups/live-capability')
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group by ID
|
||||
* @param id - Group ID
|
||||
@@ -467,6 +478,7 @@ export const groupsAPI = {
|
||||
getAll,
|
||||
getByPlatform,
|
||||
getAllIncludingInactive,
|
||||
getLiveCapability,
|
||||
getById,
|
||||
getModelsListCandidates,
|
||||
create,
|
||||
|
||||
Reference in New Issue
Block a user