import store from '@/store/index.js';
import Cookies from 'js-cookie';

const TokenKey = 'connect.sid1'; 

export function getToken() {
    return store.getters.token || Cookies.get(TokenKey);
}

export function updateToken(token) {
    return token ? Cookies.set(TokenKey, token, { path: '' }) : Cookies.remove(TokenKey);
}

