mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 16:16:37 +08:00
系统控制台完成更新
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {BaseService} from '@/lib/services';
|
||||
import type {
|
||||
AdminUser,
|
||||
AppUpdateStatus,
|
||||
AuthSource,
|
||||
AuthSourceRequest,
|
||||
CacheConfig,
|
||||
@@ -136,6 +137,16 @@ export class AdminService extends BaseService {
|
||||
return this.post<{ success: boolean; log: string; error: string }>('/system-configs/smtp/test', request);
|
||||
}
|
||||
|
||||
// ==================== 应用更新 ====================
|
||||
|
||||
static async getUpdateStatus(): Promise<AppUpdateStatus> {
|
||||
return this.get<AppUpdateStatus>('/update');
|
||||
}
|
||||
|
||||
static async applyUpdate(): Promise<void> {
|
||||
return this.post<void>('/update/apply');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有已存在的文件业务类型及默认内置类型列表
|
||||
* @returns 业务类型列表
|
||||
|
||||
@@ -42,6 +42,7 @@ export type {
|
||||
UpdateUserStatusRequest,
|
||||
SystemStatus,
|
||||
DatabaseInfo,
|
||||
AppUpdateStatus,
|
||||
Schedule,
|
||||
CreateScheduleRequest,
|
||||
UpdateScheduleRequest,
|
||||
|
||||
@@ -439,6 +439,25 @@ export interface DatabaseInfo {
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用更新状态
|
||||
*/
|
||||
export interface AppUpdateStatus {
|
||||
current_version: string;
|
||||
build_time: string;
|
||||
latest_version: string;
|
||||
update_available: boolean;
|
||||
can_upgrade: boolean;
|
||||
prerelease: boolean;
|
||||
release_name: string;
|
||||
release_notes: string;
|
||||
release_url: string;
|
||||
published_at: string;
|
||||
upstream_repository: string;
|
||||
asset_name: string;
|
||||
platform: string;
|
||||
}
|
||||
|
||||
// ==================== 缓存管理 ====================
|
||||
|
||||
/**
|
||||
@@ -470,4 +489,3 @@ export interface CacheConfig {
|
||||
/** 是否启用 LRU 淘汰 */
|
||||
lru_enabled: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user