1234567891011121314151617181920212223242526272829 |
- import axiosInstance from './interceptor';
- export interface SoftwareInfo {
- language: string[];
- product: string;
- server: Record<
- string,
- {
- build: string;
- desc: string;
- version: string;
- }
- >;
- }
- export interface SoftwareInfoResponse {
- code: string;
- description: string;
- solution: string;
- data: SoftwareInfo;
- }
- export async function fetchSoftwareInfo(): Promise<SoftwareInfo> {
- const response = await axiosInstance.get('/pub/software_info');
- if (response.data && response.data.code === '0x000000') {
- return response.data.data;
- }
- throw new Error('Failed to fetch software info');
- }
|