Async function return [object promise] instead of boolean value

This function should tell me if a user is already registered by checking the email entered by him and checking the database, I have already done several checks, in fact he is connected to the database and executes the query, but I do not understand why at the time of the return, does not return a boolean value as it should but returns [object Promise].


registrato = async () => {

    var controllo=false;
    const query = new Moralis.Query('_User');
    query.equalTo("email","[email protected]");   //with this email, the length of the query is 1
   

    try {
        const results = await query.find();
        console.log(results);
       if(results.length>0){     //true with that email
            controllo=true;
            console.log("value "+controllo);     //the alert appears and the value is true
            return controllo;     //here is returning [object promise] instead of true
          }
     }

    catch(err) {
        alert("Error: " + error.code + " " + error.message);
    }

    return controllo;   //here is returning [object Promise] instead of false

 }

I think that you have to call this function with await so that it doesn’t return a promise

unrelated: you may need to do that query in a cloud function, because you can query only current user data from a browser, in a cloud function you can use master key

And how can I stop a promise from returning while keeping the await?

you can write something like x = await registrato()