mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
fixed 增加自动登录,gitea注册
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user