diff --git a/app/static/src/app/store/sessions/actions.ts b/app/static/src/app/store/sessions/actions.ts index aa656b08e..80e66b924 100644 --- a/app/static/src/app/store/sessions/actions.ts +++ b/app/static/src/app/store/sessions/actions.ts @@ -35,7 +35,8 @@ export const actions: ActionTree = { const sessionIds = localStorageManager.getSessionIds(appName!, rootGetters[AppStateGetter.baseUrlPath]); const sessionIdsQs = sessionIds.join(","); const removeDuplicates = !rootState.userPreferences.showDuplicateSessions; - const url = `/${appsPath}/${appName}/sessions/metadata?sessionIds=${sessionIdsQs}&removeDuplicates=${removeDuplicates}`; + const qs = `?sessionIds=${sessionIdsQs}&removeDuplicates=${removeDuplicates}`; + const url = `/${appsPath}/${appName}/sessions/metadata${qs}`; await api(context) .withSuccess(SessionsMutation.SetSessionsMetadata) .withError(`errors/${ErrorsMutation.AddError}`, true) diff --git a/app/static/tests/unit/components/sessions/sessionsPage.test.ts b/app/static/tests/unit/components/sessions/sessionsPage.test.ts index 2d267fd7b..cabbb9318 100644 --- a/app/static/tests/unit/components/sessions/sessionsPage.test.ts +++ b/app/static/tests/unit/components/sessions/sessionsPage.test.ts @@ -2,16 +2,16 @@ import { shallowMount } from "@vue/test-utils"; import Vuex from "vuex"; import VueFeather from "vue-feather"; import { RouterLink } from "vue-router"; +import { nextTick } from "vue"; import SessionsPage from "../../../../src/app/components/sessions/SessionsPage.vue"; import ErrorsAlert from "../../../../src/app/components/ErrorsAlert.vue"; import { BasicState } from "../../../../src/app/store/basic/state"; -import {mockBasicState, mockUserPreferences} from "../../../mocks"; +import { mockBasicState, mockUserPreferences } from "../../../mocks"; import { SessionsAction } from "../../../../src/app/store/sessions/actions"; import { SessionMetadata } from "../../../../src/app/types/responseTypes"; import EditSessionLabel from "../../../../src/app/components/sessions/EditSessionLabel.vue"; import ConfirmModal from "../../../../src/app/components/ConfirmModal.vue"; import { AppStateAction } from "../../../../src/app/store/appState/actions"; -import {nextTick} from "vue"; describe("SessionsPage", () => { const mockGetSessions = jest.fn(); diff --git a/app/static/tests/unit/localStorageManager.test.ts b/app/static/tests/unit/localStorageManager.test.ts index fd9e961c6..a90d1c8ca 100644 --- a/app/static/tests/unit/localStorageManager.test.ts +++ b/app/static/tests/unit/localStorageManager.test.ts @@ -1,5 +1,5 @@ import { localStorageManager } from "../../src/app/localStorageManager"; -import {mockUserPreferences} from "../mocks"; +import { mockUserPreferences } from "../mocks"; describe("localStorageManager for sessions", () => { let spyOnGetItem: any; diff --git a/app/static/tests/unit/store/sessions/actions.test.ts b/app/static/tests/unit/store/sessions/actions.test.ts index 627b38cf8..5a4221c84 100644 --- a/app/static/tests/unit/store/sessions/actions.test.ts +++ b/app/static/tests/unit/store/sessions/actions.test.ts @@ -222,7 +222,7 @@ describe("SessionsActions", () => { const url = "/apps/test-app/sessions/metadata?sessionIds=123,456&removeDuplicates=true"; mockAxios.onGet(url).reply(200, mockSuccess(metadata)); - const userPreferences = {...mockUserPreferences(), showDuplicateSessions: false}; + const userPreferences = { ...mockUserPreferences(), showDuplicateSessions: false }; const rootState = mockBasicState({ appName: "test-app", appsPath: "apps", userPreferences }); const commit = jest.fn(); await (actions[SessionsAction.GetSessions] as any)({ commit, rootState, rootGetters }); @@ -242,7 +242,7 @@ describe("SessionsActions", () => { const url = "/apps/test-app/sessions/metadata?sessionIds=123,456&removeDuplicates=false"; mockAxios.onGet(url).reply(200, mockSuccess([])); - const userPreferences = {...mockUserPreferences(), showDuplicateSessions: true}; + const userPreferences = { ...mockUserPreferences(), showDuplicateSessions: true }; const rootState = mockBasicState({ appName: "test-app", appsPath: "apps", userPreferences }); const commit = jest.fn(); await (actions[SessionsAction.GetSessions] as any)({ commit, rootState, rootGetters });