function formatActivity(activity, overrides) {
  // @todo Refactor vs LocationIngest.formatActivity
  const {
    id: _id,
    athlete,
    start_date_local,
    start_date,
  } = activity;
  return {
    _id,
    added_date: new Date().toISOString(),
    athlete_id: athlete.id,
    source: 'webhook',
    start_date_local,
    startDateUtc: new Date(start_date),
    ...overrides,
  };
}
/**
 * Convert raw Strava API data to base of Activity data model
 *
 * @param {Object} activity
 * @param {Object} overrides Optional. Properties to override output
 * @returns {Object}
 */
Convert raw Strava API data to base of Activity data model
@param {Object} activity
@param {Object} overrides Optional. Properties to override output
@returns {Object}
Convert raw Strava API data to base of Activity data model @param { Object } activity @param { Object } overrides Optional . Properties to override output @returns { Object }
function formatActivity(activity, overrides) {
  const {
    id: _id,
    athlete,
    start_date_local,
    start_date,
  } = activity;
  return {
    _id,
    added_date: new Date().toISOString(),
    athlete_id: athlete.id,
    source: 'webhook',
    start_date_local,
    startDateUtc: new Date(start_date),
    ...overrides,
  };
}
function formatActivity ( activity , overrides ) { const { id : _id , athlete , start_date_local , start_date , } = activity ; return { _id , added_date : new Date ( ) . toISOString ( ) , athlete_id : athlete . id , source : 'webhook' , start_date_local , startDateUtc : new Date ( start_date ) , ... overrides , } ; }
Convert raw Strava API data to base of Activity data model
 @param {Object} activity
 @param {Object} overrides Optional.
Convert raw Strava API data to base of Activity data model @param { Object } activity @param { Object } overrides Optional .
// @todo Refactor vs LocationIngest.formatActivity