fix: 修正条目创建时重复重建索引的问题

This commit is contained in:
2025-12-13 05:38:37 +00:00
parent 8c63680b81
commit 20b7b5a8b7

View File

@ -136,12 +136,8 @@ export default defineHook(async ({ init, filter, action, schedule }, { services,
}
});
filter('items.create', () => {
logger.info('Creating Item!');
});
// 监听 items.create 事件以触发 MeiliSearch 索引创建
action('items.create', async ({ meta }) => {
action('items.create', async (meta) => {
const cfg = await getConfig(meta?.collection);
if (!cfg) return;
const configId = cfg.id;