fix: 补充apiKey认证

This commit is contained in:
2025-11-05 07:01:40 +00:00
parent ca613e7b34
commit 326c6a005c

View File

@ -118,10 +118,11 @@ export default defineEndpoint({
if (meiliConfigs.length === 0) {
return res.status(500).json({ success: false, message: 'MeiliSearch 全局配置未设置' });
}
const { host } = meiliConfigs[0] || { host: '', apiKey: '' };
const { host, apiKey } = meiliConfigs[0] || { host: '', apiKey: '' };
const client = new MeiliSearch({
host,
apiKey,
})
const result: any[] = [];