diff --git a/ExpressAPI/src/managers/GitlabManager.ts b/ExpressAPI/src/managers/GitlabManager.ts index 3ce9a4b157dc98fa15b4487a04d5b9621d9f2807..f48e9391cad444bf03d0660a3392ef1b08be9f5b 100644 --- a/ExpressAPI/src/managers/GitlabManager.ts +++ b/ExpressAPI/src/managers/GitlabManager.ts @@ -164,7 +164,7 @@ class GitlabManager extends SharedGitlabManager { } private createUpdateFile(create: boolean, repoId: number, filePath: string, fileBase64: string, commitMessage: string, branch: string = 'main', authorName: string = 'Dojo', authorMail: string | undefined = undefined): Promise<RepositoryFileSchema> { - const gitFunction = create ? this.api.RepositoryFiles.create : this.api.RepositoryFiles.edit; + const gitFunction = create ? this.api.RepositoryFiles.create.bind(this.api) : this.api.RepositoryFiles.edit.bind(this.api); return gitFunction(repoId, filePath, branch, fileBase64, commitMessage, { encoding : 'base64',