Introduce group basic federation, event new page and notifications

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-02-18 08:57:00 +01:00
parent 300ef8f245
commit 4144e9ffd0
416 changed files with 32220 additions and 16750 deletions

View File

@@ -1,12 +1,14 @@
import { NavigationGuard } from 'vue-router';
import { UserRouteName } from '@/router/user';
import { LoginErrorCode } from '@/types/login-error-code.model';
import { AUTH_ACCESS_TOKEN } from '@/constants';
import { NavigationGuard } from "vue-router";
import { UserRouteName } from "@/router/user";
import { LoginErrorCode } from "@/types/login-error-code.model";
import { AUTH_ACCESS_TOKEN } from "@/constants";
export const authGuardIfNeeded: NavigationGuard = async function (to, from, next) {
// eslint-disable-next-line import/prefer-default-export
export const authGuardIfNeeded: NavigationGuard = async (to, from, next) => {
if (to.meta.requiredAuth !== true) return next();
// We can't use "currentUser" from apollo here because we may not have loaded the user from the local storage yet
// We can't use "currentUser" from apollo here
// because we may not have loaded the user from the local storage yet
if (!localStorage.getItem(AUTH_ACCESS_TOKEN)) {
return next({
name: UserRouteName.LOGIN,