I would like to filter out all records from EthNFTOwners that does not match
token_address == “0xe804f5a2b14ae03345fffb89bded13a2ef5cefa7”
I made this cloud function
Moralis.Cloud.beforeSave("EthNFTOwners", (request) => {
const logger = Moralis.Cloud.getLogger();
logger.info("log EthNFTOwners");
const token_address = request.object.get("token_address");
logger.info(token_address);
},{
fields: {
token_address : {
required:true,
options: token_address => {
return token_address == "0xe804f5a2b14ae03345fffb89bded13a2ef5cefa7";
},
error: 'token address must be 0xe804f5a2b14ae03345fffb89bded13a2ef5cefa7'
}
}
});
The is that EthNFTOwners adds all records, not only ones with
token_address == “0xe804f5a2b14ae03345fffb89bded13a2ef5cefa7”
I see in the logs that function is running but it still save all tokens to EthNFTOwners, not only my contract ones
Please help how to solve this
Thank you