|
|
|
@ -61,7 +61,8 @@ class HacksController < ApplicationController
|
|
|
|
|
hack_codes = hack.hack_codes.new(hack_code_params)
|
|
|
|
|
hack_codes.modify_time = Time.now
|
|
|
|
|
hack_codes.save!
|
|
|
|
|
new_item_params = item_params.merge({container: hack, item_type: 'PROGRAM', difficulty: params[:hack][:difficult], user_id: current_user.id})
|
|
|
|
|
logger.info("#############hack_codes:#{hack_codes.id}")
|
|
|
|
|
new_item_params = item_params.merge(container: hack, item_type: 'PROGRAM', difficulty: params[:hack][:difficult], user_id: current_user.id)
|
|
|
|
|
ItemBank.create!(new_item_params)
|
|
|
|
|
end
|
|
|
|
|
render_ok({identifier: hack.identifier})
|
|
|
|
|