Skip to content

Commit

Permalink
EPMRPP-89729 || Several endpoint improvements on API tab in API Docum…
Browse files Browse the repository at this point in the history
…entation page
  • Loading branch information
BlazarQSO committed May 8, 2024
1 parent 2049f19 commit aeb007d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/src/common/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const URLS = {
apiDocs: (apiType) => `${apiType}/api-docs`,

dataPhoto: (at, loadThumbnail) => `${urlBase}data/photo${getQueryParams({ at, loadThumbnail })}`,
dataUserPhoto: (activeProject, id, loadThumbnail) =>
`${urlBase}data/${activeProject}/userphoto${getQueryParams({ id, loadThumbnail })}`,
dataUserPhoto: (activeProject, login, loadThumbnail) =>
`${urlBase}data/${activeProject}/userphoto${getQueryParams({ login, loadThumbnail })}`,

dashboard: (activeProject, id) => `${urlBase}${activeProject}/dashboard/${id}`,
dashboards: (activeProject) =>
Expand Down Expand Up @@ -136,8 +136,8 @@ export const URLS = {
projectDeleteDefectType: (activeProject, id) =>
`${urlBase}${activeProject}/settings/sub-type/${id}`,
projects: () => `${urlBase}project/list`,
projectPreferences: (activeProject, userId, filterId = '') =>
`${urlBase}project/${activeProject}/preference/${userId}/${filterId}`,
projectPreferences: (activeProject, filterId = '') =>
`${urlBase}project/${activeProject}/preference/${filterId}`,
projectUsers: (activeProject) => `${urlBase}project/${activeProject}/users`,
projectUserSearchUser: (activeProject) => (searchTerm) =>
`${urlBase}project/${activeProject}/usernames/search${getQueryParams({
Expand Down
8 changes: 3 additions & 5 deletions app/src/controllers/project/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { projectIdSelector } from 'controllers/pages';
import { hideModalAction } from 'controllers/modal';
import { showScreenLockAction, hideScreenLockAction } from 'controllers/screenLock';
import { fetch } from 'common/utils';
import { activeProjectSelector, userIdSelector } from 'controllers/user';
import { activeProjectSelector } from 'controllers/user';
import { setProjectIntegrationsAction } from 'controllers/plugins';
import {
addFilterAction,
Expand Down Expand Up @@ -432,8 +432,7 @@ function* watchFetchProject() {
}

function* fetchProjectPreferences({ payload: projectId }) {
const userId = yield select(userIdSelector);
const preferences = yield call(fetch, URLS.projectPreferences(projectId, userId));
const preferences = yield call(fetch, URLS.projectPreferences(projectId));
yield put(fetchProjectPreferencesSuccessAction(preferences));
yield put(fetchUserFiltersSuccessAction(preferences.filters));
}
Expand Down Expand Up @@ -475,8 +474,7 @@ function* watchShowFilterOnLaunches() {
function* updateProjectFilterPreferences({ payload = {} }) {
const { filterId, method } = payload;
const activeProject = yield select(activeProjectSelector);
const userId = yield select(userIdSelector);
yield call(fetch, URLS.projectPreferences(activeProject, userId, filterId), { method });
yield call(fetch, URLS.projectPreferences(activeProject, filterId), { method });
}

function* watchUpdateProjectFilterPreferences() {
Expand Down

0 comments on commit aeb007d

Please sign in to comment.