From 5de5974102b7ec804f2bf8439fd46723767675ba Mon Sep 17 00:00:00 2001 From: jasder Date: Fri, 19 Mar 2021 10:54:56 +0800 Subject: [PATCH] FIX remove email for gitea_register api --- app/controllers/accounts_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 042cbe2b..2beeaf32 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -11,7 +11,6 @@ class AccountsController < ApplicationController Users::SyncGiteaForm.new(sync_gitea_params).validate! user = User.find_by(login: sync_gitea_params[:login]) return render_error("该用户已同步协作平台") if user.gitea_token.present? && user.gitea_uid.present? - user.mail = sync_gitea_params[:email] interactor = Gitea::RegisterInteractor.call({username: sync_gitea_params[:login], email: sync_gitea_params[:email], password: sync_gitea_params[:password]}) if interactor.success? gitea_user = interactor.result @@ -363,7 +362,7 @@ class AccountsController < ApplicationController { login: pre + code, email: email, phone: phone } end - def sync_gitea_params + def sync_gitea_params params.permit(:login, :email, :password) end