mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 10:39:20 +08:00
修改获取配置文件接口,初始化系统配置
This commit is contained in:
@@ -30,11 +30,13 @@ const Config = () => {
|
||||
const [language, setLanguage] = useState<string>('shell');
|
||||
|
||||
const getConfig = (name: string) => {
|
||||
request.get(`${config.apiPrefix}configs/${name}`).then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
setValue(data);
|
||||
}
|
||||
});
|
||||
request
|
||||
.get(`${config.apiPrefix}configs/detail?path=${encodeURIComponent(name)}`)
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
setValue(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getFiles = () => {
|
||||
|
||||
Reference in New Issue
Block a user