I created a simple cloud function:
Moralis.Cloud.define("createBattle", async (request) => {
var pendingBattle = Moralis.Object.extend("pendingBattle");
return pendingBattle;
});
but when I try to call this, “pendingBattle” always undefined
can anyone help? Thanks.