solved problem with not returning header by using self build url

This commit is contained in:
Maren Süwer
2018-09-11 11:17:11 +02:00
parent 75ba5f33b1
commit 00694da935
3 changed files with 19 additions and 18 deletions

View File

@@ -39,7 +39,7 @@ type Props = {
permission: PermissionEntry,
namespace: string,
repoName: string,
callback: () => void
callback?: () => void
) => void,
createPermissionReset: (string, string) => void,
@@ -62,20 +62,11 @@ class Permissions extends React.Component<Props> {
fetchPermissions(namespace, repoName);
}
permissionCreated = () => {
const { namespace, repoName, history } = this.props;
console.log("fetch permissions!");
//history.push(`/repo/${namespace}/${repoName}/permissions`);
this.props.fetchPermissions(namespace, repoName);
};
createPermission = (permission: Permission) => {
console.log("create Permission");
this.props.createPermission(
permission,
this.props.namespace,
this.props.repoName,
this.permissionCreated
this.props.repoName
);
};
@@ -175,7 +166,7 @@ const mapDispatchToProps = dispatch => {
permission: PermissionEntry,
namespace: string,
repoName: string,
callback: () => void
callback?: () => void
) => {
dispatch(createPermission(permission, namespace, repoName, callback));
},