Moralis-admin-cli deploy What server do you want to connect to?:Invalid Input

Is it possible that the use of moralis-admin-cli is only for payment accounts?
No works.

no, moralis-admin-cli should work fine with a free account

The server still does not detect me by entering the keys correctly.
para_mandar

it looks like it didn’t list any servers, you should see a list of servers there before choosing a server index

Exactly. That is the problem it indicated. I have a server but it is not detected despite correctly entering both the CLI APY KEY and the CLI APY SECRET

ok, can you try to remove current cloud code and update your server?

I try to update and re start the server and give me this error:

There is a Cloud Function Error (Syntax/Undefined Variables) on your code, in order to Update/Restart your server fix the error first, You can check the full Log on the Dashboard -> Logs -> Error

yes, I was expecting that, that is why I said first to remove current cloud code

What current cloud code
you mean? Do I delete the server and create a new one?

Or do you mean the cloud functions? I have the following;

Moralis.Cloud.define("getAvgGas", async function (request) {
  const query = new Moralis.Query("BscTransactions");
  const pipeline = [
    {
      group: {
        // group by "from_address"
        objectId: "$from_address",
        // add computed property avgGas
        // get average and convert wei to gwei
        avgGas: { $avg: { $divide: ["$gas_price", 1000000000]} },
      },
    },
    { sort: { avgGas: -1 } }, // sort by avgGas high to low
    { limit: 10 }, // only return top 10 results
  ];

  // the master key is required for aggregate queries
  const results = await query.aggregate(pipeline, { useMasterKey: true });
  return results;
})

no, I mean to remove that cloud code (cloud functions) after you make it a backup, in case that it is an error because of that code that it is added there

I’m trying to delete that function in the cloud but it won’t let me. The safeFile button does not update the delete code.

It gives me the impression that the most effective thing is to delete the server and create a new one.

what you mean by this, how it doesn’t let you to save?

exactly. dont let me save when remove the code.

how does it stop you from doing that?

It doesn’t stop me. It doesn’t work directly. It does not update the file.

I’m trying now to update your server

server updated, can you try again now with moralis-admin-cli?

Of course. I go to it and inform you right away.

Keep with the same problem. But I have not deleted the cloud function. I go to it and inform you.