code
Moralis.Cloud.define("allUsernames", async (request) => {
const query = new Moralis.Query("User");
const results = await query.find({ useMasterKey: true });
// return results;
return results.map({username, createdAt, updatedAt} => ({username, createdAt, updatedAt}));
});
Moralis.Cloud.define("allUsers", async (request) => {
const query = new Moralis.Query("User");
const results = await query.find({ useMasterKey: true });
return results;
});
Moralis.Cloud.define("hello", async (request) => {
return "world!";
});
I got error with message
// 20220605203736
// https://7olxsw72bp15.usemoralis.com:2053/server/functions/hello?_ApplicationId=CL4l7a0ddvU0SAZdDJkqFSPs9BTUm2lcX9HW4ZYG
{
"code": 141,
"error": "Invalid function: \"hello\""
}
can anyone help?
Thanks,
Jay Lin