mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-13 08:15:55 +08:00
add: trace controller and router
This commit is contained in:
14
app/controllers/trace/trace_users_controller.rb
Normal file
14
app/controllers/trace/trace_users_controller.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class Trace::TraceUsersController < Trace::BaseController
|
||||
before_action :require_auth
|
||||
|
||||
def create
|
||||
if current_user.trace_token.present?
|
||||
render_ok
|
||||
else
|
||||
render_error(-1, "代码溯源用户初始化失败")
|
||||
end
|
||||
rescue Exception => exception
|
||||
puts exception.message
|
||||
normal_status(-1, exception.message)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user