add: trace controller and router

This commit is contained in:
2022-05-09 18:12:27 +08:00
parent f5efbcfc04
commit 12cc37443e
6 changed files with 112 additions and 6 deletions

View 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