後,我想插入後寫入到另一個集合,併爲該任務,我使用流星蒐集鉤子包裝https://github.com/matb33/meteor-collection-hooks使用流星收集鉤插入
我想知道我將如何插入火災後回調。 Currenty我使用這個代碼中插入
'schoolNew': function(post){
Schools.insert({
schoolname: post.input_sn,
schooldescription: post.input_sd,
schoollocation: post.input_sl,
schoollogo: post.input_ls
});
},
正如醫生說https://github.com/matb33/meteor-collection-hooks#afterinsertuserid-doc
的文檔插入後激發。
我該如何使用回調?
插入返回該ID後,您可以獲取與該ID的數據。 –