mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
init project
This commit is contained in:
23
app/controllers/bidding_users_controller.rb
Normal file
23
app/controllers/bidding_users_controller.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class BiddingUsersController < ApplicationController
|
||||
before_action :require_login, :check_auth
|
||||
|
||||
def create
|
||||
ProjectPackages::BiddingService.call(current_package, current_user)
|
||||
render_ok
|
||||
rescue ProjectPackages::BiddingService::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
||||
def win
|
||||
ProjectPackages::WinBiddingService.call(current_package, current_user, params)
|
||||
render_ok
|
||||
rescue ProjectPackages::WinBiddingService::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def current_package
|
||||
@_current_package ||= ProjectPackage.find(params[:project_package_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user