import { apiClient } from "./client";

export const settingsApi = {
  get: async (key: string): Promise<string> => {
    const r = await apiClient.get(`/settings/${key}`);
    return r.data.data.value ?? "";
  },
  save: async (key: string, value: string): Promise<void> => {
    await apiClient.put(`/settings/${key}`, { value });
  },
};
