fix: clean up exports, add reset

This commit is contained in:
Mutasem Aldmour 2024-09-19 15:50:21 +02:00
parent a150c3d694
commit ba8df60304
No known key found for this signature in database
GPG key ID: 3DFA8122BB7FD6B8
2 changed files with 5 additions and 3 deletions

View file

@ -144,6 +144,10 @@ export class Telemetry {
} }
} }
reset() {
this.rudderStack?.reset();
}
flushPageEvents() { flushPageEvents() {
const queue = this.pageEventQueue; const queue = this.pageEventQueue;
this.pageEventQueue = []; this.pageEventQueue = [];

View file

@ -140,6 +140,7 @@ export const useUsersStore = defineStore(STORES.USERS, () => {
const unsetCurrentUser = () => { const unsetCurrentUser = () => {
currentUserId.value = null; currentUserId.value = null;
currentUserCloudInfo.value = null; currentUserCloudInfo.value = null;
telemetry.reset();
RBACStore.setGlobalScopes([]); RBACStore.setGlobalScopes([]);
}; };
@ -374,11 +375,8 @@ export const useUsersStore = defineStore(STORES.USERS, () => {
globalRoleName, globalRoleName,
personalizedNodeTypes, personalizedNodeTypes,
addUsers, addUsers,
setCurrentUser,
loginWithCookie, loginWithCookie,
initialize, initialize,
unsetCurrentUser,
deleteUserById,
setPersonalizationAnswers, setPersonalizationAnswers,
loginWithCreds, loginWithCreds,
logout, logout,