mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
change repository-types to repositoryTypes
This commit is contained in:
@@ -32,7 +32,7 @@ export function fetchRepositoryTypesIfNeeded() {
|
||||
function fetchRepositoryTypes(dispatch: any) {
|
||||
dispatch(fetchRepositoryTypesPending());
|
||||
return apiClient
|
||||
.get("repository-types")
|
||||
.get("repositoryTypes")
|
||||
.then(response => response.json())
|
||||
.then(repositoryTypes => {
|
||||
dispatch(fetchRepositoryTypesSuccess(repositoryTypes));
|
||||
@@ -84,7 +84,7 @@ export default function reducer(
|
||||
action: Action = { type: "UNKNOWN" }
|
||||
): RepositoryType[] {
|
||||
if (action.type === FETCH_REPOSITORY_TYPES_SUCCESS && action.payload) {
|
||||
return action.payload._embedded["repository-types"];
|
||||
return action.payload._embedded["repositoryTypes"];
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ const git = {
|
||||
displayName: "Git",
|
||||
_links: {
|
||||
self: {
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repository-types/git"
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repositoryTypes/git"
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -32,7 +32,7 @@ const hg = {
|
||||
displayName: "Mercurial",
|
||||
_links: {
|
||||
self: {
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repository-types/hg"
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repositoryTypes/hg"
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -42,18 +42,18 @@ const svn = {
|
||||
displayName: "Subversion",
|
||||
_links: {
|
||||
self: {
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repository-types/svn"
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repositoryTypes/svn"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const collection = {
|
||||
_embedded: {
|
||||
"repository-types": [git, hg, svn]
|
||||
repositoryTypes: [git, hg, svn]
|
||||
},
|
||||
_links: {
|
||||
self: {
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repository-types"
|
||||
href: "http://localhost:8081/scm/api/rest/v2/repositoryTypes"
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -97,7 +97,7 @@ describe("repository types caching", () => {
|
||||
});
|
||||
|
||||
describe("repository types fetch", () => {
|
||||
const URL = "/scm/api/rest/v2/repository-types";
|
||||
const URL = "/scm/api/rest/v2/repositoryTypes";
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user