From e81e82d075d895b8e072ce647bba4b0d7017a68b Mon Sep 17 00:00:00 2001 From: sylenien Date: Fri, 30 Sep 2022 11:06:40 +0200 Subject: [PATCH] change(ui): change session urls --- frontend/app/duck/assignments.js | 10 +++++----- frontend/app/duck/issues.js | 10 +++++----- frontend/app/duck/sessions.js | 10 +++++----- frontend/app/duck/tests/runs.js | 4 ++-- frontend/app/services/SessionService.ts | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/frontend/app/duck/assignments.js b/frontend/app/duck/assignments.js index 0892df161..896484899 100644 --- a/frontend/app/duck/assignments.js +++ b/frontend/app/duck/assignments.js @@ -48,7 +48,7 @@ const reducer = (state = initialState, action = {}) => { return state.set('activeIssue', Assignment({ ...action.data, users})); case FETCH_META.SUCCESS: issueTypes = action.data.issueTypes - var issueTypeIcons = {} + var issueTypeIcons = {} issueTypes.forEach(iss => { issueTypeIcons[iss.id] = iss.iconUrl }) @@ -96,14 +96,14 @@ export function fetchMeta(projectId) { export function fetchAssignments(sessionId) { return { types: FETCH_ASSIGNMENTS.toArray(), - call: client => client.get(`/sessions2/${ sessionId }/assign`) + call: client => client.get(`/sessions/${ sessionId }/assign`) } } export function fetchAssigment(sessionId, id) { return { types: FETCH_ASSIGNMENT.toArray(), - call: client => client.get(`/sessions2/${ sessionId }/assign/${ id }`) + call: client => client.get(`/sessions/${ sessionId }/assign/${ id }`) } } @@ -111,13 +111,13 @@ export function addActivity(sessionId, params) { const data = { ...params, assignee: params.assignee.value, issueType: params.issueType.value } return { types: ADD_ACTIVITY.toArray(), - call: client => client.post(`/sessions2/${ sessionId }/assign/projects/${params.projectId.value}`, data), + call: client => client.post(`/sessions/${ sessionId }/assign/projects/${params.projectId.value}`, data), } } export function addMessage(sessionId, assignmentId, params) { return { types: ADD_MESSAGE.toArray(), - call: client => client.post(`/sessions2/${ sessionId }/assign/${ assignmentId }/comment`, params), + call: client => client.post(`/sessions/${ sessionId }/assign/${ assignmentId }/comment`, params), } } diff --git a/frontend/app/duck/issues.js b/frontend/app/duck/issues.js index fcd6d9584..6c2c70733 100644 --- a/frontend/app/duck/issues.js +++ b/frontend/app/duck/issues.js @@ -84,7 +84,7 @@ export const edit = createEdit(name); export function fetchAssignments(sessionId) { return { types: FETCH_ASSIGNMENTS.toArray(), - call: client => client.get(`/sessions2/${ sessionId }/assign`) + call: client => client.get(`/sessions/${ sessionId }/assign`) } } @@ -104,7 +104,7 @@ export function fetchProjects() { export function fetchIssue(sessionId, id) { return { types: FETCH_ISSUE.toArray(), - call: client => client.get(`/sessions2/${ sessionId }/assign/jira/${ id }`) + call: client => client.get(`/sessions/${ sessionId }/assign/jira/${ id }`) } } @@ -118,13 +118,13 @@ export function fetchMeta(projectId) { export function addActivity(sessionId, params) { return { types: ADD_ACTIVITY.toArray(), - call: client => client.post(`/sessions2/${ sessionId }/assign`, params.toCreate()), + call: client => client.post(`/sessions/${ sessionId }/assign`, params.toCreate()), } } export function addMessage(sessionId, assignmentId, params) { return { types: ADD_MESSAGE.toArray(), - call: client => client.post(`/sessions2/${ sessionId }/assign/${ assignmentId }/comment`, params), + call: client => client.post(`/sessions/${ sessionId }/assign/${ assignmentId }/comment`, params), } -} \ No newline at end of file +} diff --git a/frontend/app/duck/sessions.js b/frontend/app/duck/sessions.js index d2556fce3..fe8927097 100644 --- a/frontend/app/duck/sessions.js +++ b/frontend/app/duck/sessions.js @@ -241,7 +241,7 @@ export const fetchList = setSessionFilter(cleanSessionFilters(params)); return dispatch({ types: FETCH_LIST.toArray(), - call: (client) => client.post('/sessions/search2', params), + call: (client) => client.post('/sessions/search', params), params: cleanParams(params), }); }; @@ -249,7 +249,7 @@ export const fetchList = export function fetchErrorStackList(sessionId, errorId) { return { types: FETCH_ERROR_STACK.toArray(), - call: (client) => client.get(`/sessions2/${sessionId}/errors/${errorId}/sourcemaps`), + call: (client) => client.get(`/sessions/${sessionId}/errors/${errorId}/sourcemaps`), }; } @@ -258,7 +258,7 @@ export const fetch = (dispatch, getState) => { dispatch({ types: FETCH.toArray(), - call: (client) => client.get(isLive ? `/assist/sessions/${sessionId}` : `/sessions2/${sessionId}`), + call: (client) => client.get(isLive ? `/assist/sessions/${sessionId}` : `/sessions/${sessionId}`), filter: getState().getIn(['filters', 'appliedFilter']), }); }; @@ -266,7 +266,7 @@ export const fetch = export function toggleFavorite(sessionId) { return { types: TOGGLE_FAVORITE.toArray(), - call: (client) => client.get(`/sessions2/${sessionId}/favorite`), + call: (client) => client.get(`/sessions/${sessionId}/favorite`), sessionId, }; } @@ -274,7 +274,7 @@ export function toggleFavorite(sessionId) { export function fetchFavoriteList() { return { types: FETCH_FAVORITE_LIST.toArray(), - call: (client) => client.get('/sessions2/favorite'), + call: (client) => client.get('/sessions/favorite'), }; } diff --git a/frontend/app/duck/tests/runs.js b/frontend/app/duck/tests/runs.js index 19aed0fd0..e5f1ecc3d 100644 --- a/frontend/app/duck/tests/runs.js +++ b/frontend/app/duck/tests/runs.js @@ -40,7 +40,7 @@ const reducer = (state = initialState, action = {}) => { const test = state.get('list').find(({ testId }) => testId === action.testId); const run = Run({ runId: action.data.id, state: RUNNING, testId: action.testId, name: test.name - }); + }); return updateRun(state, action.testId, run); } case STOP_RUN.SUCCESS: { @@ -73,7 +73,7 @@ export default reduceDucks({ reducer, initialState }, requestDuck); export function generateTest(sessionId, params) { return { types: GEN_TEST.toArray(), - call: client => client.post(`/sessions2/${ sessionId }/gentest`, params), + call: client => client.post(`/sessions/${ sessionId }/gentest`, params), }; } diff --git a/frontend/app/services/SessionService.ts b/frontend/app/services/SessionService.ts index 07c623359..01964e41a 100644 --- a/frontend/app/services/SessionService.ts +++ b/frontend/app/services/SessionService.ts @@ -25,7 +25,7 @@ export default class SettingsService { getSessions(filter: any) { return this.client - .post('/sessions/search2', filter) + .post('/sessions/search', filter) .then(fetchErrorCheck) .then((response) => response.data || []); }