<commit_before>import axios from 'axios'

export function getProductions(){
    return axios({
        requestId: 'productions',
        method: 'get',
        url: 'http://localhost:3000/productions',
        cancelPreviousReqeust: true
    })
}

export function getCompanies(){
    return axios({
        requestId: 'companies',
        method: 'get',
        url: 'http://localhost:3000/companies',
        cancelPreviousReqeust: true
    })
}

export function postSession(data) {    
    return axios({
        requestId: 'session',
        method: 'post',
        url: 'http://localhost:3000/sessions',
        data
    })
}

export function deleteSession() {
    const authToken = localStorage.getItem('user_token')
    return axios({
        requestId: 'session',
        method: 'delete',
        url: 'http://localhost:3000/sessions/' + authToken,
    })
}<commit_msg>Adjusted api to hit local vs production env<commit_after>import axios from 'axios'
import axiosDefaults from 'axios/lib/defaults'

var debug = process.env.NODE_ENV !== 'production',
    baseURL = 'http://localhost:3000'
if (!debug) { baseURL = 'http://api.upstagecommunity.com'}
axiosDefaults.baseURL = baseURL

export function getProductions(){
    return axios({
        requestId: 'productions',
        method: 'get',
        url: '/productions',
        cancelPreviousReqeust: true
    })
}

export function getCompanies(){
    return axios({
        requestId: 'companies',
        method: 'get',
        url: '/companies',
        cancelPreviousReqeust: true
    })
}

export function postSession(data) {    
    return axios({
        requestId: 'session',
        method: 'post',
        url: '/sessions',
        data
    })
}

export function deleteSession() {
    const authToken = localStorage.getItem('user_token')
    return axios({
        requestId: 'session',
        method: 'delete',
        url: '/sessions/' + authToken,
    })
}
{'fraction_non_alphanumeric': 0.129149377593361, 'fraction_numerical': 0.01037344398340249, 'mean_word_length': 2.639622641509434, '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': '5283710', 'n_tokens_mistral': 587, 'n_tokens_neox': 565, 'n_words': 137}