Browse Source

fixed 增加自动登录,gitea注册

pull/313/head
xiaoxiaoqiong 4 years ago
parent
commit
85a36ca2e7
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/controllers/users_controller.rb

+ 1
- 0
app/controllers/users_controller.rb View File

@@ -378,6 +378,7 @@ class UsersController < ApplicationController
interactor = Gitea::RegisterInteractor.call({username: login, email: email, password: password})
if interactor.success?
gitea_user = interactor.result
Rails.logger.info("Gitea::RegisterInteractor.call result====== #{gitea_user}")
result = Gitea::User::GenerateTokenService.call(login, password)
user.gitea_token = result['sha1']
user.gitea_uid = gitea_user[:body]['id']


Loading…
Cancel
Save