async function updateEarth(earthId, earth) {
    console.info(`Updating earth with specified earth id: ${earthId}`);
    return await Earth.update(earth.dataValues, {where: {
        id: earthId
    }}).then((updatedEarth) => {
        console.log(updatedEarth)
        return updatedEarth;
    }).catch((err) => {
        if (err) {
            console.warn(err);
            return(err);
        }
    });
}
/**
 * This method communicates with the database and updates an existing earth.
 * @param {The id of the earth} earthId
 * @param {The updated earth model} earth
 */
This method communicates with the database and updates an existing earth.
@param {The id of the earth} earthId
@param {The updated earth model} earth
This method communicates with the database and updates an existing earth . @param { The id of the earth } earthId @param { The updated earth model } earth
async function updateEarth(earthId, earth) {
    console.info(`Updating earth with specified earth id: ${earthId}`);
    return await Earth.update(earth.dataValues, {where: {
        id: earthId
    }}).then((updatedEarth) => {
        console.log(updatedEarth)
        return updatedEarth;
    }).catch((err) => {
        if (err) {
            console.warn(err);
            return(err);
        }
    });
}
async function updateEarth ( earthId , earth ) { console . info ( ` ${ earthId } ` ) ; return await Earth . update ( earth . dataValues , { where : { id : earthId } } ) . then ( ( updatedEarth ) => { console . log ( updatedEarth ) return updatedEarth ; } ) . catch ( ( err ) => { if ( err ) { console . warn ( err ) ; return ( err ) ; } } ) ; }
This method communicates with the database and updates an existing earth.
This method communicates with the database and updates an existing earth .