Parsing error: Unexpected token }

Hello,
I am trying to create a button that canges the matching value in the dataset when clicked

// API Reference: https://www.wix.com/corvid/reference
// “Hello, World!” Example: https://www.wix.com/corvid/hello-world
import wixData from 'wix-data';

$w.onReady(function () {
 // Write your JavaScript here

 // To select an element by ID use: $w("#elementID")

 // Click "Preview" to run your code
});

export function button1_click(event) {
 let username = $w("#input1").value;
    wixData.query('Sandbox');
    eq('title', username)
    .find()
    .then(res => {
 if (res.length === 0) {
 // name not found in DB
      }
 else {
        $w("#dataset1").setFieldValue("testNumber", 50);
        $w("#dataset1").save();
      }
    }

Unfortunatlly it does not run as it throws a Parsing error on line 26

If I could have some help with this that would be great.

Thanks,
Tom

Look at the red parentheses:

.then(res => {

You forgot to close it.