<commit_before>export const createRemoteAlert = alert => {
  return fetch(`http://localhost:3001/alerts/new`, {
    body: JSON.stringify({alert}),
    headers: {
      "Content-Type": "application/json"
    },
    method: "POST"
  })
  .then(
    res => res.json(),
    err => console.log("An error occured.", err)
  )
}

export const updateRemoteAlert = alert => {
  return fetch(`http://localhost:3001/alert/${alert.id}/update`, {
    body: JSON.stringify({alert}),
    headers: {
      "Content-Type": "application/json"
    },
    method: "POST"
  })
  .then(
    res => res.json(),
    err => console.log("An error occured.", err)
  )
}<commit_msg>add delete alert api function<commit_after>export const createRemoteAlert = alert => {
  return fetch(`http://localhost:3001/alerts/new`, {
    body: JSON.stringify({alert}),
    headers: {
      "Content-Type": "application/json"
    },
    method: "POST"
  })
  .then(
    res => res.json(),
    err => console.log("An error occured.", err)
  )
}

export const updateRemoteAlert = alert => {
  return fetch(`http://localhost:3001/alert/${alert.id}/update`, {
    body: JSON.stringify({alert}),
    headers: {
      "Content-Type": "application/json"
    },
    method: "POST"
  })
  .then(
    res => res.json(),
    err => console.log("An error occured.", err)
  )
}

export const deleteRemoteAlert = id => {
  return fetch(`http://localhost:3001/alert/${id}/delete`, {
    headers: {
      "Content-Type": "application/json"
    },
    method: "DELETE"
  })
}
{'fraction_non_alphanumeric': 0.18469656992084432, 'fraction_numerical': 0.013192612137203167, 'mean_word_length': 2.9712041884816753, 'pattern_counts': {'":': 5, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 0, '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': '7279802', 'n_tokens_mistral': 503, 'n_tokens_neox': 494, 'n_words': 99}