This commit is contained in:
@@ -23,6 +23,7 @@ export { OrderService } from './order'
|
||||
export { AssetService } from './asset'
|
||||
export { AgentRechargeService } from './agentRecharge'
|
||||
export { PaymentSettingsService } from './paymentSettings'
|
||||
export { SystemConfigService } from './systemConfig'
|
||||
export { ExchangeService } from './exchange'
|
||||
export { RefundService } from './refund'
|
||||
export { DataCleanupService } from './dataCleanup'
|
||||
|
||||
28
src/api/modules/systemConfig.ts
Normal file
28
src/api/modules/systemConfig.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { BaseService } from '../BaseService'
|
||||
import type { BaseResponse } from '@/types/api'
|
||||
import type {
|
||||
SystemConfigItem,
|
||||
SystemConfigPageResult,
|
||||
SystemConfigQueryParams,
|
||||
UpdateSystemConfigRequest
|
||||
} from '@/types/api/systemConfig'
|
||||
|
||||
const SYSTEM_CONFIG_BASE_URL = '/api/admin/system-configs'
|
||||
|
||||
export class SystemConfigService extends BaseService {
|
||||
static getSystemConfigs(
|
||||
params?: SystemConfigQueryParams
|
||||
): Promise<BaseResponse<SystemConfigPageResult>> {
|
||||
return this.get<BaseResponse<SystemConfigPageResult>>(SYSTEM_CONFIG_BASE_URL, params)
|
||||
}
|
||||
|
||||
static updateSystemConfig(
|
||||
key: string,
|
||||
data: UpdateSystemConfigRequest
|
||||
): Promise<BaseResponse<SystemConfigItem>> {
|
||||
return this.put<BaseResponse<SystemConfigItem>>(
|
||||
`${SYSTEM_CONFIG_BASE_URL}/${encodeURIComponent(key)}`,
|
||||
data
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user