<commit_before>import { CLEAN_STATE, GET_ALL_LISTS_IN_BOARD, GET_ONE_BOARD, SAVE_BOARD_TITLE } from './constants'

export const cleanState = () => (dispatch) => {
  dispatch({
    type: CLEAN_STATE,
  })
}

export const getAllListsInBoard = boardId => (dispatch) => {
  dispatch({
    type: GET_ALL_LISTS_IN_BOARD,
    payload: {
      request: {
        method: 'GET',
        url: `/api/boards/${boardId}/lists`,
      },
    },
  })
}

export const getOneBoard = boardId => (dispatch) => {
  dispatch({
    type: GET_ONE_BOARD,
    payload: {
      request: {
        method: 'GET',
        url: `/api/boards/${boardId}`,
      },
    },
  })
}

export const saveBoardTitle = (boardId, boardTitle) => (dispatch) => {
  dispatch({
    type: SAVE_BOARD_TITLE,
    payload: {
      request: {
        method: 'PUT',
        url: `/boards/${boardId}`,
        data: {
          title: boardTitle,
        },
      },
    },
  })
}<commit_msg>FIX Rename board hit /api<commit_after>import { CLEAN_STATE, GET_ALL_LISTS_IN_BOARD, GET_ONE_BOARD, SAVE_BOARD_TITLE } from './constants'

export const cleanState = () => (dispatch) => {
  dispatch({
    type: CLEAN_STATE,
  })
}

export const getAllListsInBoard = boardId => (dispatch) => {
  dispatch({
    type: GET_ALL_LISTS_IN_BOARD,
    payload: {
      request: {
        method: 'GET',
        url: `/api/boards/${boardId}/lists`,
      },
    },
  })
}

export const getOneBoard = boardId => (dispatch) => {
  dispatch({
    type: GET_ONE_BOARD,
    payload: {
      request: {
        method: 'GET',
        url: `/api/boards/${boardId}`,
      },
    },
  })
}

export const saveBoardTitle = (boardId, boardTitle) => (dispatch) => {
  dispatch({
    type: SAVE_BOARD_TITLE,
    payload: {
      request: {
        method: 'PUT',
        url: `/api/boards/${boardId}`,
        data: {
          title: boardTitle,
        },
      },
    },
  })
}
{'fraction_non_alphanumeric': 0.15806111696522657, 'fraction_numerical': 0.0, 'mean_word_length': 2.337434094903339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3807396', 'n_tokens_mistral': 667, 'n_tokens_neox': 667, 'n_words': 124}