mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
ADD sync users salt column
This commit is contained in:
@@ -131,6 +131,15 @@ class UsersController < ApplicationController
|
||||
interactor.success? ? render_ok : render_error(interactor.error)
|
||||
end
|
||||
|
||||
# TODO
|
||||
# 同步trusite平台用户的salt信息,只需同步一次,同步完成后,该方法可以删除
|
||||
def sync_salt
|
||||
user = User.find_by_login params[:login]
|
||||
return if user.blank?
|
||||
user.update_column(:salt, params[:salt])
|
||||
render_ok
|
||||
end
|
||||
|
||||
private
|
||||
def load_user
|
||||
@user = User.find_by_login(params[:id]) || User.find_by(id: params[:id])
|
||||
|
||||
@@ -149,6 +149,7 @@ Rails.application.routes.draw do
|
||||
post :sync_token
|
||||
get :projects
|
||||
post :sync_gitea_pwd
|
||||
post :sync_salt
|
||||
end
|
||||
|
||||
scope module: :users do
|
||||
|
||||
Reference in New Issue
Block a user