fix: 修正条目创建时重复重建索引的问题
This commit is contained in:
@ -136,12 +136,8 @@ export default defineHook(async ({ init, filter, action, schedule }, { services,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
filter('items.create', () => {
|
|
||||||
logger.info('Creating Item!');
|
|
||||||
});
|
|
||||||
|
|
||||||
// 监听 items.create 事件以触发 MeiliSearch 索引创建
|
// 监听 items.create 事件以触发 MeiliSearch 索引创建
|
||||||
action('items.create', async ({ meta }) => {
|
action('items.create', async (meta) => {
|
||||||
const cfg = await getConfig(meta?.collection);
|
const cfg = await getConfig(meta?.collection);
|
||||||
if (!cfg) return;
|
if (!cfg) return;
|
||||||
const configId = cfg.id;
|
const configId = cfg.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user