Resync on login

Is it possible to trigger re-sync when user log in with their metamask.

What you mean by re-sync?

so once the user login it will perform β€˜sync’ and populate database with collections like EthNFTOwners I have a before update trigger on this collection. I want to rerun this trigger again on all the item, is the best way to do it, manually through moralis/node. Or is there a better pattern?

You could do it in beforeSave for User class, not sure if this is the best option, you should use some kind of flag when you process that data so that you don’t reprocess it every time

1 Like