mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
17 lines
339 B
JavaScript
17 lines
339 B
JavaScript
|
|
//@flow
|
||
|
|
import { apiClient } from "@scm-manager/ui-components";
|
||
|
|
|
||
|
|
export function getHistory(url: string) {
|
||
|
|
return apiClient
|
||
|
|
.get(url)
|
||
|
|
.then(response => response.json())
|
||
|
|
.then(result => {
|
||
|
|
return {
|
||
|
|
changesets: result._embedded.changesets
|
||
|
|
};
|
||
|
|
})
|
||
|
|
.catch(err => {
|
||
|
|
return { error: err };
|
||
|
|
});
|
||
|
|
}
|