mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 02:06:37 +08:00
prettier
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import type {InternalAxiosRequestConfig} from 'axios';
|
||||
import type { InternalAxiosRequestConfig } from 'axios';
|
||||
|
||||
import apiClient from '@/lib/services/core/api-client';
|
||||
import {BaseService} from '@/lib/services/core';
|
||||
import type {DBOverview, ExecuteSQLResponse, TableDataResponse} from './types';
|
||||
import { BaseService } from '@/lib/services/core';
|
||||
import type {
|
||||
DBOverview,
|
||||
ExecuteSQLResponse,
|
||||
TableDataResponse,
|
||||
} from './types';
|
||||
|
||||
/**
|
||||
* 数据库管理服务类
|
||||
@@ -32,7 +36,10 @@ export class DbManageService extends BaseService {
|
||||
page: number;
|
||||
pageSize: number;
|
||||
}): Promise<TableDataResponse> {
|
||||
return this.get<TableDataResponse>('/table-data', params as unknown as Record<string, unknown>);
|
||||
return this.get<TableDataResponse>(
|
||||
'/table-data',
|
||||
params as unknown as Record<string, unknown>,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +58,8 @@ export class DbManageService extends BaseService {
|
||||
responseType: 'blob',
|
||||
} as InternalAxiosRequestConfig);
|
||||
|
||||
const disposition = response.headers['content-disposition'] as string | undefined;
|
||||
const disposition = response.headers['content-disposition'] as
|
||||
string | undefined;
|
||||
let filename = 'wavelet_export';
|
||||
if (disposition) {
|
||||
const match = disposition.match(/filename="?([^";]+)"?/);
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
export { DbManageService } from './db-manage.service';
|
||||
export type { DBOverview, TableDataResponse, ExecuteSQLResponse } from './types';
|
||||
export type {
|
||||
DBOverview,
|
||||
TableDataResponse,
|
||||
ExecuteSQLResponse,
|
||||
} from './types';
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface TableDataResponse {
|
||||
* 执行自定义 SQL 的响应
|
||||
*/
|
||||
export interface ExecuteSQLResponse {
|
||||
type: "select" | "exec";
|
||||
type: 'select' | 'exec';
|
||||
columns?: string[];
|
||||
results?: Record<string, unknown>[];
|
||||
affected_rows: number;
|
||||
|
||||
Reference in New Issue
Block a user