diff --git a/helpers/Dojo/SharedAssignmentHelper.ts b/helpers/Dojo/SharedAssignmentHelper.ts index c729540b5ce660f1918ac9078b97652f29027524..0193b3e7067fef5598be2ecb135b63f1fbde71b1 100644 --- a/helpers/Dojo/SharedAssignmentHelper.ts +++ b/helpers/Dojo/SharedAssignmentHelper.ts @@ -20,7 +20,7 @@ class SharedAssignmentHelper { } async isPublishable(repositoryId: number): Promise<{ isPublishable: boolean, lastPipeline: Gitlab.PipelineSchema | null, status?: { code: DojoStatusCode, message: string } }> { - const pipelines = await GlobalHelper.sharedGitlabManager.getRepositoryPipelines(repositoryId, 'main'); + const pipelines = await GlobalHelper.gitlabManager.getRepositoryPipelines(repositoryId, 'main'); if ( pipelines.length > 0 ) { const lastPipeline = pipelines[0]; if ( lastPipeline.status !== GitlabPipelineStatus.SUCCESS.valueOf() ) { diff --git a/helpers/Dojo/SharedExerciseHelper.ts b/helpers/Dojo/SharedExerciseHelper.ts deleted file mode 100644 index 97ccf7c9a39682ba8b14fa65b54a89d9898ebf3c..0000000000000000000000000000000000000000 --- a/helpers/Dojo/SharedExerciseHelper.ts +++ /dev/null @@ -1,4 +0,0 @@ -class SharedExerciseHelper {} - - -export default new SharedExerciseHelper(); \ No newline at end of file diff --git a/managers/SharedGitlabManager.ts b/managers/SharedGitlabManager.ts index 4cea2ee9aa080ca22132aa9b2835b6426b0c8f66..8a77156febe0c7bba5706ad86e4045d4bc908ffa 100644 --- a/managers/SharedGitlabManager.ts +++ b/managers/SharedGitlabManager.ts @@ -8,7 +8,7 @@ import { StatusCodes } from 'http-status-c class SharedGitlabManager { - private api!: GitlabCore.Gitlab<false>; + protected api!: GitlabCore.Gitlab<false>; private readonly refreshTokenFunction?: () => Promise<string>; setToken(token: string) { @@ -23,7 +23,7 @@ class SharedGitlabManager { this.setToken(token); } - private async executeGitlabRequest<T>(request: () => Promise<T>, refreshTokenIfNeeded: boolean = true): Promise<T> { + protected async executeGitlabRequest<T>(request: () => Promise<T>, refreshTokenIfNeeded: boolean = true): Promise<T> { try { return await request(); } catch ( error ) {