增加前端格式检查配置
This commit is contained in:
@@ -12,11 +12,18 @@ export interface SystemConfig {
|
||||
}
|
||||
|
||||
export async function fetchSystemConfigs() {
|
||||
const { data } = await apiClient.get<ApiResponse<{ items: SystemConfig[] }>>('/admin/system-configs')
|
||||
const { data } =
|
||||
await apiClient.get<ApiResponse<{ items: SystemConfig[] }>>('/admin/system-configs')
|
||||
return data.data.items
|
||||
}
|
||||
|
||||
export async function updateSystemConfig(key: string, payload: { value: string; description?: string }) {
|
||||
const { data } = await apiClient.put<ApiResponse<SystemConfig>>(`/admin/system-configs/${key}`, payload)
|
||||
export async function updateSystemConfig(
|
||||
key: string,
|
||||
payload: { value: string; description?: string }
|
||||
) {
|
||||
const { data } = await apiClient.put<ApiResponse<SystemConfig>>(
|
||||
`/admin/system-configs/${key}`,
|
||||
payload
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user