ADD users/hovercard api

This commit is contained in:
jasder
2021-04-22 16:36:40 +08:00
parent 841778900c
commit 908cda56f3
6 changed files with 40 additions and 12 deletions

View File

@@ -2,8 +2,8 @@ class UsersController < ApplicationController
include ApplicationHelper
include Ci::DbConnectable
before_action :load_user, only: [:show, :homepage_info, :sync_token, :sync_gitea_pwd, :projects, :watch_users, :fan_users]
before_action :check_user_exist, only: [:show, :homepage_info,:projects, :watch_users, :fan_users]
before_action :load_user, only: [:show, :homepage_info, :sync_token, :sync_gitea_pwd, :projects, :watch_users, :fan_users, :hovercard]
before_action :check_user_exist, only: [:show, :homepage_info,:projects, :watch_users, :fan_users, :hovercard]
before_action :require_login, only: %i[me list sync_user_info]
before_action :connect_to_ci_db, only: [:get_user_info]
skip_before_action :check_sign, only: [:attachment_show]
@@ -56,6 +56,9 @@ class UsersController < ApplicationController
@watchers = paginate(watchers)
end
def hovercard
end
def update
@user = User.find params[:id]
@user.update!(user_params)