Cloud Functions

Moralis.Cloud.define("getData", async (request) => {
      const query = new Moralis.Query("Note");
	  query.descending("createdAt")
	  const results = await query.find({sessionToken: request.user.get('sesstionToken')});
      console.log(request.user)
      return results
});

Here are the Cloud Functions you should put on your server.