/**
 *
 * @param {{tag: string;title: string;content: string}} options
 * @returns
 */
const upload = options => {
  return fetch('https://aplus.aplnk.com/aplus-sql-service/sync/upDocument', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      // 替换为实际的认证信息
      Authorization: process.env.NODE_SERVER_SECRET,
    },
    body: JSON.stringify({
      tag: options.tag,
      title: options.title,
      module: 'aplus-antdv',
      content: options.content,
    }),
  });
};

module.exports = {
  upload,
};
