<commit_before>import asyncFetch from 'api/helpers/asyncFetch';
import getBaseRequestConfig from 'api/helpers/baseRequestConfig';

async function requestUserDecks(userID) {
  // const NOTIFICATIONS_API_URL =
  //   'http://localhost:5000/api/notifications?sort=-createdAt';
  // const PARAMETER = `&page[offset]=${offset}`;
  //
  // const baseRequestConfig = getBaseRequestConfig();
  //
  // const requestConfig = Object.assign({}, baseRequestConfig, {
  //   method: 'GET',
  // });
  //
  // const response = await asyncFetch(
  //   NOTIFICATIONS_API_URL + PARAMETER,
  //   requestConfig,
  // );
  // const responseBody = await response.json();
  //
  // return responseBody.data;
}

export default requestUserDecks;<commit_msg>actually implemented api call<commit_after>import asyncFetch from 'api/helpers/asyncFetch';
import getBaseRequestConfig from 'api/helpers/baseRequestConfig';

async function requestUserDecks(userID) {
  const USER_DECKS_URL = `http://localhost:5000/api/users/${userID}/decks`;

  const baseRequestConfig = getBaseRequestConfig();

  const requestConfig = Object.assign({}, baseRequestConfig, {
    method: 'GET',
  });

  const response = await asyncFetch(USER_DECKS_URL, requestConfig);
  const responseBody = await response.json();

  return responseBody.data;
}

export default requestUserDecks;
{'fraction_non_alphanumeric': 0.12978244561140284, 'fraction_numerical': 0.006001500375093774, 'mean_word_length': 4.4227642276422765, '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': '4878487', 'n_tokens_mistral': 406, 'n_tokens_neox': 403, 'n_words': 81}