mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
add "init repository" checkbox to repository form
This commit is contained in:
@@ -155,11 +155,12 @@ export function fetchRepoFailure(namespace: string, name: string, error: Error):
|
||||
|
||||
// create repo
|
||||
|
||||
export function createRepo(link: string, repository: Repository, callback?: (repo: Repository) => void) {
|
||||
export function createRepo(link: string, repository: Repository, initRepository: boolean, callback?: (repo: Repository) => void) {
|
||||
return function(dispatch: any) {
|
||||
dispatch(createRepoPending());
|
||||
const repoLink = initRepository ? link + "?initRepository=true" : link;
|
||||
return apiClient
|
||||
.post(link, repository, CONTENT_TYPE)
|
||||
.post(repoLink, repository, CONTENT_TYPE)
|
||||
.then(response => {
|
||||
const location = response.headers.get("Location");
|
||||
dispatch(createRepoSuccess());
|
||||
|
||||
Reference in New Issue
Block a user