async function createUser(user) {
    console.info("Creating user");
    return await User.create({
        username: user.username,
        email: user.email,
        password: user.password
    }).then((createdUser) => {
        return createdUser;
    }).catch((err) => {
        if (err) {
            console.warn(err);
            return(err);
        }
    });
}
/*
* This method communicates with the database and will
* create the specified user into the database.
* @author Ruben Fricke
*/
This method communicates with the database and will
create the specified user into the database.
This method communicates with the database and will create the specified user into the database .
async function createUser(user) {
    console.info("Creating user");
    return await User.create({
        username: user.username,
        email: user.email,
        password: user.password
    }).then((createdUser) => {
        return createdUser;
    }).catch((err) => {
        if (err) {
            console.warn(err);
            return(err);
        }
    });
}
async function createUser ( user ) { console . info ( "Creating user" ) ; return await User . create ( { username : user . username , email : user . email , password : user . password } ) . then ( ( createdUser ) => { return createdUser ; } ) . catch ( ( err ) => { if ( err ) { console . warn ( err ) ; return ( err ) ; } } ) ; }
This method communicates with the database and will
create the specified user into the database.
This method communicates with the database and will create the specified user into the database .