|
|
|
@ -128,7 +128,8 @@ class ShixunsService
|
|
|
|
|
manager = current_user.manager_of_shixun?(dis, current_user)
|
|
|
|
|
game_url =
|
|
|
|
|
if manager
|
|
|
|
|
challenge_id = dis.challenges.where(position: d.position).pluck(:id).first
|
|
|
|
|
position = d.position.nil? ? 1 : d.position
|
|
|
|
|
challenge_id = dis.challenges.where(position: position).pluck(:id).first
|
|
|
|
|
game_identifier = Game.where(user_id: current_user,
|
|
|
|
|
challenge_id: challenge_id).pluck(:identifier).first
|
|
|
|
|
"/tasks/#{game_identifier}"
|
|
|
|
|