<commit_before>let fetchBySlugResource, fetchByIdResource, oauthEndpointResource

if (process.env.REACT_APP_API_SERVER) {
  // set URL base for fetching by slug
  const fetchBySlugBase = "/contents/slug"
  fetchBySlugResource = `${process.env.REACT_APP_API_SERVER}${fetchBySlugBase}`
  // set URL base for fetching by ID
  const fetchByIdBase = "/contents"
  fetchByIdResource = `${process.env.REACT_APP_API_SERVER}${fetchByIdBase}`
} else {
  fetchBySlugResource = "http://localhost:8080/contents/slug"
  fetchByIdResource = "http://localhost:8080/contents"
}

if (process.env.REACT_APP_AUTH_SERVER) {
  const oauthEndpointBase = "/tokens"
  oauthEndpointResource = `${
    process.env.REACT_APP_AUTH_SERVER
  }${oauthEndpointBase}`
} else {
  oauthEndpointResource = "http://localhost:9999/tokens"
}

export { fetchBySlugResource, fetchByIdResource, oauthEndpointResource }<commit_msg>add fetch helpers for user api<commit_after>let fetchBySlugResource,
  fetchByIdResource,
  fetchUserByIdResource,
  fetchUserByEmailResource,
  oauthEndpointResource

if (process.env.REACT_APP_API_SERVER) {
  // set URL base for fetching by slug
  const fetchBySlugBase = "/contents/slug"
  fetchBySlugResource = `${process.env.REACT_APP_API_SERVER}${fetchBySlugBase}`
  // set URL base for fetching by ID
  const fetchByIdBase = "/contents"
  fetchByIdResource = `${process.env.REACT_APP_API_SERVER}${fetchByIdBase}`
  // set URL base for fetching user by ID
  const fetchUserByIdBase = "/users"
  fetchUserByIdResource = `${
    process.env.REACT_APP_API_SERVER
  }${fetchUserByIdBase}`
  // set URL base for fetching user by email
  const fetchUserByEmailBase = "/users/email"
  fetchUserByEmailResource = `${
    process.env.REACT_APP_API_SERVER
  }${fetchUserByEmailBase}`
} else {
  fetchBySlugResource = "http://localhost:8080/contents/slug"
  fetchByIdResource = "http://localhost:8080/contents"
  fetchUserByIdResource = "http://localhost:8080/users"
  fetchUserByEmailResource = "http://localhost:8000/users/email"
}

if (process.env.REACT_APP_AUTH_SERVER) {
  const oauthEndpointBase = "/tokens"
  oauthEndpointResource = `${
    process.env.REACT_APP_AUTH_SERVER
  }${oauthEndpointBase}`
} else {
  oauthEndpointResource = "http://localhost:9999/tokens"
}

export {
  fetchBySlugResource,
  fetchByIdResource,
  fetchUserByIdResource,
  fetchUserByEmailResource,
  oauthEndpointResource
}
{'fraction_non_alphanumeric': 0.10720268006700168, 'fraction_numerical': 0.01340033500837521, 'mean_word_length': 5.3537234042553195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '896525', 'n_tokens_mistral': 786, 'n_tokens_neox': 779, 'n_words': 141}