FIX code bug

This commit is contained in:
Jasder 2020-11-24 11:32:03 +08:00
parent 5d5f0f42c0
commit 75202b1fc3
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ class AccountsController < ApplicationController
interactor = Gitea::RegisterInteractor.call({username: login, email: email, password: params[:password]})
if interactor.success?
gitea_user = interactor.result
result = Gitea::User::GenerateTokenService.new(username, params[:password]).call
result = Gitea::User::GenerateTokenService.new(login, params[:password]).call
@user.gitea_token = result['sha1']
@user.gitea_uid = gitea_user['id']
if user.save!