Commit 5a4ba3d7 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'vs/use-named-export-for-default-per-page' into 'master'

Use named export for the DEFAULT_PER_PAGE constant

See merge request gitlab-org/gitlab!66195
parents 3bacba23 f300de29
...@@ -3,7 +3,7 @@ import { __ } from '~/locale'; ...@@ -3,7 +3,7 @@ import { __ } from '~/locale';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import { joinPaths } from './lib/utils/url_utility'; import { joinPaths } from './lib/utils/url_utility';
const DEFAULT_PER_PAGE = 20; export const DEFAULT_PER_PAGE = 20;
/** /**
* Slow deprecation Notice: Please rather use for new calls * Slow deprecation Notice: Please rather use for new calls
......
export const DEFAULT_PER_PAGE = 20;
import { DEFAULT_PER_PAGE } from '~/api';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils'; import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const GROUPS_PATH = '/api/:version/groups.json'; const GROUPS_PATH = '/api/:version/groups.json';
const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups'; const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups';
......
import { DEFAULT_PER_PAGE } from '~/api';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils'; import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const PROJECTS_PATH = '/api/:version/projects.json'; const PROJECTS_PATH = '/api/:version/projects.json';
......
import { DEFAULT_PER_PAGE } from '~/api';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils'; import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const USER_COUNTS_PATH = '/api/:version/user_counts'; const USER_COUNTS_PATH = '/api/:version/user_counts';
const USERS_PATH = '/api/:version/users.json'; const USERS_PATH = '/api/:version/users.json';
......
import Api from '~/api'; import Api, { DEFAULT_PER_PAGE } from '~/api';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { ContentTypeMultipartFormData } from '~/lib/utils/headers'; import { ContentTypeMultipartFormData } from '~/lib/utils/headers';
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
.get(url, { .get(url, {
params: { params: {
search: query, search: query,
per_page: Api.DEFAULT_PER_PAGE, per_page: DEFAULT_PER_PAGE,
active: true, active: true,
}, },
}) })
...@@ -379,7 +379,7 @@ export default { ...@@ -379,7 +379,7 @@ export default {
fetchBillableGroupMembersList(namespaceId, options = {}, callback = () => {}) { fetchBillableGroupMembersList(namespaceId, options = {}, callback = () => {}) {
const url = Api.buildUrl(this.billableGroupMembersPath).replace(':id', namespaceId); const url = Api.buildUrl(this.billableGroupMembersPath).replace(':id', namespaceId);
const defaults = { const defaults = {
per_page: Api.DEFAULT_PER_PAGE, per_page: DEFAULT_PER_PAGE,
page: 1, page: 1,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment