Closed brasiqui closed 1 year ago
I think this can be done in another way without having to change the core.
I think this can be done in another way without having to change the core.
The opts.sofDelete and opts.scope already exists in internal methods, but never called by standard actions. The idea is expose them as params in the standard action. But if this is intentional, then another way is creating a custom remove, update, and replace action.
It's intentional. If you create a public CRUD API with this library, you won't be happy if the client/frontend can change the delete logic from soft to real or can skip the default scopes (e.g. a tenant scope).
If you want your use-case, better if you create a new realDelete
action with extra permissions...etc and call the internal methods.
Hi, This params are necessary because we are using scopes and soft delete. If a document is flagged for deletion and I want to permanently remove, then I need to disable the default scope, otherwise the record will not be found.
Please, verify.
Roni Cruz