replace Client/Resource.register with before create hook