@ -49,10 +49,10 @@ class TrustieHacksController < ApplicationController
# 报名入口
def entry
if @hack.hack_users.exists?(user_id: current_user)
if @hack.hack_users.exists?(user_id: current_user.id)
render_error('已经报名,请勿重复操作')
else
@hack.hack_users.create(user_id: current_user)
@hack.hack_users.create(user_id: current_user.id)
render_ok
end