Removed console log & debug message

This commit is contained in:
2022-08-09 01:03:32 +02:00
parent fde8fd9259
commit f8196b162e
5 changed files with 2 additions and 16 deletions

View File

@@ -2,18 +2,14 @@ import { refreshToken } from "@/api";
import { parseJwt } from "@/utils";
function getCookie(name) {
console.debug("getting cookie with name:", name);
var arrayb = document.cookie.split(";");
for (const item of arrayb) {
const query = `${name}=`;
if (!item.startsWith(query)) continue;
console.debug("found from cookies:", item);
return item.substr(query.length);
}
console.debug("no token found");
return null;
}
@@ -87,7 +83,6 @@ export default {
if (!jwtToken) return null;
const token = parseJwt(jwtToken);
console.debug("has token: ", token);
return await dispatch("setupStateFromToken", token);
},
setupStateFromToken: ({ commit }, token) => {
@@ -98,13 +93,6 @@ export default {
return false;
}
console.debug("setting:", {
username,
admin: admin != undefined,
settings,
token
});
commit("SET_TOKEN", token);
commit("SET_USERNAME", username);
commit("SET_SETTINGS", settings);