change(ui): change session urls

This commit is contained in:
sylenien 2022-09-30 11:06:40 +02:00
parent 1890ff2af1
commit e81e82d075
5 changed files with 18 additions and 18 deletions

View file

@ -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),
}
}

View file

@ -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),
}
}
}

View file

@ -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'),
};
}

View file

@ -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),
};
}

View file

@ -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 || []);
}