From 0358229b959b9affdcb31b9c40c1cb8d794e6050 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 8 Dec 2021 14:47:15 +0800 Subject: [PATCH] fix: educoder api delay --- app/controllers/repositories_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index d0b4020c4..3f797a13a 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -132,7 +132,7 @@ class RepositoriesController < ApplicationController end def contributors - if params[:filepath].present? + if params[:filepath].present? || @project.educoder? @contributors = [] else @contributors = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier) @@ -213,7 +213,11 @@ class RepositoriesController < ApplicationController end def languages - render json: languages_precentagable + if @project.educoder? + render json: {} + else + render json: languages_precentagable + end end def archive