From 8a7fd7dcc43180d4478fcb78e67f9b70478d3c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=B1=E5=91=B1=E5=91=B1?= Date: Tue, 25 Nov 2025 17:22:26 +0800 Subject: [PATCH] update render --- app/controllers/api/v1/base_controller.rb | 2 +- app/controllers/api/v1/projects/code_checks_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/base_controller.rb b/app/controllers/api/v1/base_controller.rb index 6bb5a0ead..407ae411b 100644 --- a/app/controllers/api/v1/base_controller.rb +++ b/app/controllers/api/v1/base_controller.rb @@ -72,6 +72,6 @@ class Api::V1::BaseController < ApplicationController end def verification_with_setting(key) - return render_forbidden unless EduSetting.get(key).split(",").include?(current_user.id.to_s) + return render_error("您没有该权限") unless EduSetting.get(key).split(",").include?(current_user.id.to_s) end end \ No newline at end of file diff --git a/app/controllers/api/v1/projects/code_checks_controller.rb b/app/controllers/api/v1/projects/code_checks_controller.rb index d39419cfd..131b2e80b 100644 --- a/app/controllers/api/v1/projects/code_checks_controller.rb +++ b/app/controllers/api/v1/projects/code_checks_controller.rb @@ -7,7 +7,7 @@ class Api::V1::Projects::CodeChecksController < Api::V1::BaseController @client = Api::V1::Projects::CodecheckService.new(@project) end def index - + render_ok end def create @result = @client.create_task(params["branch"]) -- 2.34.1