auth.ts 549 Bytes
// @ts-ignore
import Cookies from "js-cookie"

const TokenKey = 'Admin-Token'

export function getToken() {
    return Cookies.get(TokenKey)
}

export function getTokenKey(key: string) {
    return Cookies.get(key)
}

export function setToken(token: string) {
    return Cookies.set(TokenKey, token)
}

export function setTokenKey(key: string, token: string) {
    return Cookies.set(key, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}

export function removeTokenKey(key: string) {
    return Cookies.remove(key)
}