wixData.insert inserting blank into collection

I have the following code:

export function insertDataMembers(username, email, password, wsmoStatus, ssmoStatus) {
    let toInsert = {
        'title': username.value,
        'email': email.value,
        'password': password.value,
        'wsmoStatus': wsmoStatus,
        'ssmoStatus': ssmoStatus
    };

    wixData.insert('members', toInsert, options);
}

in the backend of my site, and am calling the function from the frontend. However, when I check the actual collection, it appears like new entries have been created, but the title and all the fields I made are blank. The hidden ones aren’t blank, though. The collection is private data, but I’m in the backend and am using suppressAuth and suppressHooks. What’s going wrong?

According to your code, the username. email and password that you pass to the functions are of type of object and have a key ‘value’.
for example:

//function call
insertDataMembers({value: 'somename'}, {value: 'some@email.com'}, {value: 'my-password'})

Is it right?

No, they should be strings. Oops. It works now thank you so much!