UNPKG

@slsplus/ui

Version:
17 lines (13 loc) 471 B
import { request } from './request'; import { GetConfigResponse, PostConfigResponse } from '../typings'; const getConfig = async (): Promise<GetConfigResponse> => { const res = await request.get(`init`); return res.data as GetConfigResponse; }; const postConfig = async (config: string): Promise<PostConfigResponse> => { const res = await request.post(`generate`, { config, }); return res.data as PostConfigResponse; }; export { getConfig, postConfig };