当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How to specify Parse.Cloud.beforeSave for a specific class?

问题描述:

In some cloud code, I use a Parse.Cloud.beforeSave method.

I want to use this method only for a specific class named "mySpecialClass".

I tried code syntax like:

Parse.Cloud.beforeSave("mySpecialClass", function(request, response)

and:

Parse.Cloud.beforeSave(mySpecialClass, function(request, response)

But in both case the method gets run for any class and this is not what I want.

What should I do to have my Parse.Cloud.beforeSave method run only for for mySpecialClass and leave alone the other classes?

分享给朋友:
您可能感兴趣的文章:
随机阅读: