refactor(rest) add onDelete