Commit f300de29 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Use exported DEFAULT_PER_PAGE constant

Switch from default export to named export and delete
redundant file where this constant was define with the same value.
parent 136c9159
export const DEFAULT_PER_PAGE = 20;
import { DEFAULT_PER_PAGE } from '~/api';
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const GROUPS_PATH = '/api/:version/groups.json';
const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups';
......
import { DEFAULT_PER_PAGE } from '~/api';
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const PROJECTS_PATH = '/api/:version/projects.json';
......
import { DEFAULT_PER_PAGE } from '~/api';
import createFlash from '~/flash';
import { __ } from '~/locale';
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
import { DEFAULT_PER_PAGE } from './constants';
const USER_COUNTS_PATH = '/api/:version/user_counts';
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 { ContentTypeMultipartFormData } from '~/lib/utils/headers';
......@@ -61,7 +61,7 @@ export default {
.get(url, {
params: {
search: query,
per_page: Api.DEFAULT_PER_PAGE,
per_page: DEFAULT_PER_PAGE,
active: true,
},
})
......@@ -379,7 +379,7 @@ export default {
fetchBillableGroupMembersList(namespaceId, options = {}, callback = () => {}) {
const url = Api.buildUrl(this.billableGroupMembersPath).replace(':id', namespaceId);
const defaults = {
per_page: Api.DEFAULT_PER_PAGE,
per_page: DEFAULT_PER_PAGE,
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