Browse Source

fixed注册gitea错误信息

pull/313/head
“xxq250” 3 years ago
parent
commit
dfc2edd62d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/concerns/register_helper.rb

+ 2
- 1
app/controllers/concerns/register_helper.rb View File

@@ -12,6 +12,7 @@ module RegisterHelper
return unless user.valid?

interactor = Gitea::RegisterInteractor.call({username: username, email: email, password: password})
result ={}
if interactor.success?
gitea_user = interactor.result
result = Gitea::User::GenerateTokenService.call(username, password)
@@ -22,7 +23,7 @@ module RegisterHelper
result[:user] = {id: user.id, token: user.gitea_token}
end
else
result[:message] = interactor.error
result[:message] = interactor.result[:message]
end
result
end


Loading…
Cancel
Save