Hello, I’m trying to get the data of the Data Browser from the Dashboard using cloud functions. I mean i.e: “Role, Session, User, …” all of them.
I query for the object and then run the cloud function in the code.
Moralis.Cloud.define("getData", async (request) => {
//not sure if "DataBrowser" is correct, also tried "browser"
//but no difference
const query = new Moralis.Query("DataBrowser");
const results = await query.find();
return results;
});
getDataBrowser = async () => {
const data = await Moralis.Cloud.run("getData");
console.log(data);
}
getDataBrowser();
When I do that I get this array:
If I put const query = new Moralis.Query("User");
instead, I also get the same result, but when I put Query("Monster");
the created object “Monster”, it console.logs all of the created “Monsters”.
Please help, couldn’t find anything in the documentation or youtube to query the Data Browser using cloud functions.