Skip to content
Snippets Groups Projects
Commit e1b3d7e9 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

remove unused stuff

parent 442b128a
No related branches found
No related tags found
1 merge request!128Admin page guard
import axios from "axios";
import { tokenHeader } from "./token-utils";
import UserService from "@/services/user.service";
const API_URL = process.env.VUE_APP_BASEURL;
async function addAdmins() {
const adminList = await UserService.getAdminList();
console.log(adminList);
if (!Array.isArray(adminList)) return [];
for (let i = 0; i < adminList.length; i++) {
this.$store.commit("addAdmin", adminList[i]);
}
}
export function doLogin(loginRequest) {
const auth = { isLoggedIn: false, token: "" };
return axios
......@@ -21,7 +10,6 @@ export function doLogin(loginRequest) {
.then((response) => {
auth.isLoggedIn = true;
auth.token = response.data;
addAdmins();
return auth;
})
.catch((error) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment