<commit_before>export function fetchSources() {
  return fetch('https://newsapi.org/v1/sources?language=en&country=us')
  .then(res => {
    return res.json()
    }
  )
}

const headers = {
  'Content-Type': 'application/json',
  'AUTHORIZATION': `Bearer: ${sessionStorage.jwt}`
}

export function saveSources(user_id, source_ids) {
  return fetch(`/users/${user_id}`, {method: 'PUT',
  headers: headers,
  body: JSON.stringify({user:
      {sources: source_ids}
    })
  }).then(response => response.json())
}<commit_msg>Revise saveSources fetch<commit_after>export function fetchSources() {
  return fetch('https://newsapi.org/v1/sources?language=en&country=us')
  .then(res => {
    return res.json()
    }
  )
}

const headers = {
  'Content-Type': 'application/json',
  'AUTHORIZATION': `Bearer: ${sessionStorage.jwt}`
}

export function saveSources(user_id, source_ids) {
  return fetch(`/users/${user_id}`, {method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'AUTHORIZATION': `Bearer: ${sessionStorage.jwt}`
  },
  body: JSON.stringify({user:
      {sources: source_ids}
    })
  }).then(response => response.json())
}
{'fraction_non_alphanumeric': 0.17975567190226877, 'fraction_numerical': 0.0017452006980802793, 'mean_word_length': 4.359813084112149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4011482', 'n_tokens_mistral': 395, 'n_tokens_neox': 395, 'n_words': 68}