This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/plugins/auth.js

11 lines
234 B
JavaScript

import { Session } from "../src/helpers";
export default ({store}) => {
if (Session.isAvailable()) {
const token = Session.get('token');
if (token) {
store.commit('setToken', token);
}
}
}