Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/groups/service/groups_service.js')
-rw-r--r--app/assets/javascripts/groups/service/groups_service.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/assets/javascripts/groups/service/groups_service.js b/app/assets/javascripts/groups/service/groups_service.js
index 790b581a7c0..28d203bc9c6 100644
--- a/app/assets/javascripts/groups/service/groups_service.js
+++ b/app/assets/javascripts/groups/service/groups_service.js
@@ -1,11 +1,12 @@
import axios from '~/lib/utils/axios_utils';
export default class GroupsService {
- constructor(endpoint) {
+ constructor(endpoint, initialSort) {
this.endpoint = endpoint;
+ this.initialSort = initialSort;
}
- getGroups(parentId, page, filterGroups, sort, archived) {
+ getGroups(parentId, page, filterGroups, sort) {
const params = {};
if (parentId) {
@@ -20,12 +21,8 @@ export default class GroupsService {
params.filter = filterGroups;
}
- if (sort) {
- params.sort = sort;
- }
-
- if (archived) {
- params.archived = archived;
+ if (sort || this.initialSort) {
+ params.sort = sort || this.initialSort;
}
}