Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

cxt 5 years ago
commit 041b2ea358

@ -710,10 +710,10 @@ class GamesController < ApplicationController
resubmit_identifier = @game.resubmit_identifier
# 如果没有超时并且正在评测中
# 判断评测中的状态有两种1、如果之前没有通关的只需判断status为1即可如果通过关则判断game的resubmit_identifier是否更新
uid_logger("################game_status: #{@game.status}")
uid_logger("################params[:resubmit]: #{params[:resubmit]}")
uid_logger("################resubmit_identifier: #{resubmit_identifier}")
uid_logger("################time_out: #{params[:time_out]}")
# uid_logger("################game_status: #{@game.status}")
# uid_logger("################params[:resubmit]: #{params[:resubmit]}")
# uid_logger("################resubmit_identifier: #{resubmit_identifier}")
# uid_logger("################time_out: #{params[:time_out]}")
if (params[:time_out] == "false") && ((params[:resubmit].blank? && @game.status == 1) || (params[:resubmit].present? &&
(params[:resubmit] != resubmit_identifier)))
# 代码评测的信息

@ -1,4 +1,4 @@
class Users::AccountsController < Users::BaseController
class Users::AccountsController < Users::BaseAccountController
before_action :private_user_resources!
def show

@ -4,4 +4,12 @@ class Users::BaseAccountController < Users::BaseController
def observed_user
@_observed_user ||= (User.find_by_id(params[:account_id]) || User.find_by_login(params[:account_id]))
end
private
def require_login
return if User.current.logged?
tip_exception(401, "..")
end
end

Loading…
Cancel
Save