import request from '@/utils/request';

/**
 * 获取密钥
 * @param {object} params
 * @returns {array} data  密钥
 */
export const getSecretKey = () => {
  return request.request({
    url: '/key/get',
    method: 'get',
  });
};

/**
 * 创建密钥
 * @param {object} data
 * @returns {array} data  密钥
 */
export const createSecretKey = (data) => {
  return request.request({
    url: '/key/create',
    method: 'post',
    data,
  });
};

/**
 * 获取AppID
 * @param {object} params
 * @returns {array} data  密钥
 */
export const getAppID = () => {
  return request.request({
    url: '/appid/get',
    method: 'get',
  });
};

/**
 * 创建AppID
 * @param {object} data
 * @returns {array} data  密钥
 */
export const createAppID = (data) => {
  return request.request({
    url: '/appid/create',
    method: 'post',
    data,
  });
};
