Template
提交代码
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import request from './request';
|
||||
|
||||
export interface ConfigResponse {
|
||||
basePath: string;
|
||||
inputDir: string;
|
||||
aggregatedDir: string;
|
||||
formatIssuesDir: string;
|
||||
duplicatesDir: string;
|
||||
zhOutputDir: string;
|
||||
organizedDir: string;
|
||||
libraryFinalDir: string;
|
||||
}
|
||||
|
||||
export interface ConfigRequest {
|
||||
basePath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存基础路径配置
|
||||
*/
|
||||
export function saveBasePath(data: ConfigRequest): Promise<void> {
|
||||
return request.post('/api/config/base-path', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完整配置(包含所有派生路径)
|
||||
*/
|
||||
export function getConfig(): Promise<ConfigResponse | null> {
|
||||
return request.get('/api/config/base-path');
|
||||
}
|
||||
Reference in New Issue
Block a user