apstanisic / zmaj

Zmaj is a headless CMS for managing database
https://zmaj.vercel.app
MIT License
5 stars 0 forks source link

Handle renaming collections with authz or webhooks #70

Open apstanisic opened 1 year ago

apstanisic commented 1 year ago

Currently, webhooks are tied to collection name, but they "break" when user renames collection. It's the same for permissions. They also have fields, and they can also change name.

Simplest solution might be to use either id or table name, or to listen for emitter to emit change and then rename.

I can't use FK since, they are not always collection. For example, webhook can be used for some other things as well. Same as for authz.