Problems with cloud functions triggers

Nothing, same result. Don’t worry I’m having to much problems and I’ve lost all day with this. I’m going to try another solution for the ICO and I’ll try back again in the future. :wink:

Really like the product and the idea, but is too inconsistent for me to risk it with so little time.

Thanks anyone for all the help.

I can see that it is not working as expected, I’ll get back when I have updates

That would be great, thanks

it looks like it works now, I tried on qddpucpgulyt server

Hi @cryptokid,
The before save trigger that I defined in the cloud function is triggered. collection creation is successfull but in frontend is happening without request.object.set. In other words, the save process working before my operations in the trigger function are finished. I can see this in the logs. What is the reason?

Moralis.Cloud.beforeSave("Nfts", function(request,response) {
    const userCollection = request.object.get("collection");;
    if (userCollection) {"success");
    } else {"fail");
        const UserCollection = Moralis.Object.extend("UserCollections");
        const collection = new UserCollection();
        collection.set("userId", request.object.get("userId"));
        collection.set("title", "UntitledCollection");
        collection.set("description", "My first collection");, { useMasterKey: true }).then((usercollection) => {;
        return request.object;;

Hi, please see here how to format code on forum:

1 Like

I didn’t understand this part

In short, this line not working.

try to use with await here, and add async to Moralis.Cloud.beforeSave("Nfts", function(request,response) => Moralis.Cloud.beforeSave("Nfts", async function(request,response)