Hi everyone,
On my moralis testnet server i keep getting this error saying syntax log:
2022-03-28T13:04:22.728Z - SyntaxError: Unexpected identifier
at customUserPlugin (/moralis-server/cloud/main.js:157:26)
at /moralis-server/lib/cloud-code/plugins/index.js:144:15
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.initialize (/moralis-server/lib/cloud-code/plugins/index.js:133:3)
2022-03-28T13:04:22.728Z - CLOUD FUNCTION ERROR PLEASE CHECK YOUR CLOUD FUNCTION CODE
Below is my cloud function code:
Moralis.Cloud.define("getNFT", async (request) => {
const query = new Moralis.Query ("NFT");
query.equalTo("NFT_id", parseInt(request.params.id));
const results = await query.first();
logger.info(results);
return results;
}};