order repositories by namespace and name

This commit is contained in:
Sebastian Sdorra
2018-08-01 09:44:34 +02:00
parent ea17e536f1
commit 81ec5ae986
2 changed files with 3 additions and 2 deletions

View File

@@ -10,12 +10,13 @@ export const FETCH_REPOS_SUCCESS = `${FETCH_REPOS}_${types.SUCCESS_SUFFIX}`;
export const FETCH_REPOS_FAILURE = `${FETCH_REPOS}_${types.FAILURE_SUFFIX}`;
const REPOS_URL = "repositories";
const SORT_BY = "sortBy=namespaceAndName";
export function fetchRepos() {
return function(dispatch: any) {
dispatch(fetchReposPending());
return apiClient
.get(REPOS_URL)
.get(`${REPOS_URL}?${SORT_BY}`)
.then(response => response.json())
.then(repositories => {
dispatch(fetchReposSuccess(repositories));