import { get, put } from './apiClient';
import type { SystemConfigInfo } from '../types/service';
import type { ApiResponse } from '../types/api';

export const getSystemConfig = (configKey: string): Promise<ApiResponse<SystemConfigInfo>> =>
  get<SystemConfigInfo>(`/config/${configKey}`);

export const updateSystemConfig = (
  configKey: string,
  configValue: string,
): Promise<ApiResponse<SystemConfigInfo>> =>
  put<SystemConfigInfo>(`/config/${configKey}`, { configValue });
