From 16a5887d66ac60d4d7f1db985dbea15a967b8643 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Thu, 18 Jun 2020 11:11:17 +0800 Subject: [PATCH] change bug --- Gemfile | 1 + Gemfile.lock | 2 ++ app/services/projects/create_service.rb | 2 +- app/views/accounts/login.json.jbuilder | 17 ++++++++++++++++- dump.rdb | Bin 808 -> 1247 bytes 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 447160c94..5fad5f056 100644 --- a/Gemfile +++ b/Gemfile @@ -66,6 +66,7 @@ group :development, :test do end group :development do + gem 'prettier' gem 'rubocop', '~> 0.52.0' gem 'solargraph', '~> 0.38.0' gem 'awesome_print' diff --git a/Gemfile.lock b/Gemfile.lock index 1d40d183d..c67bcd22d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -218,6 +218,7 @@ GEM activerecord (>= 5.2.1) popper_js (1.16.0) powerpack (0.1.2) + prettier (0.18.2) public_suffix (4.0.3) puma (3.12.2) rack (2.0.9) @@ -466,6 +467,7 @@ DEPENDENCIES omniauth-oauth2 (~> 1.6.0) parallel (~> 1.19, >= 1.19.1) pdfkit + prettier puma (~> 3.11) rack-cors rack-mini-profiler diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 226ee0ad0..feab03587 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -46,7 +46,7 @@ class Projects::CreateService < ApplicationService end def get_is_public - params[:private] || true + params[:private] || false end def repo_is_public diff --git a/app/views/accounts/login.json.jbuilder b/app/views/accounts/login.json.jbuilder index 8b275cf58..548835d42 100644 --- a/app/views/accounts/login.json.jbuilder +++ b/app/views/accounts/login.json.jbuilder @@ -1 +1,16 @@ -json.partial! 'users/user', user: @user \ No newline at end of file +# json.partial! 'users/user', user: @user + +json.username @user.full_name +json.real_name @user.real_name +json.login @user.login +json.user_id @user.id +json.image_url url_to_avatar(@user) +json.admin @user.admin? +json.user_identity @user.identity +json.is_watch current_user&.watched?(@user) +# json.watched_count @user.fan_count #粉丝 +# json.watching_count @user.follow_count #关注数 +# json.undo_events @undo_events +# json.user_composes_count @user_composes_count +# json.common_projects_count @projects_common_count +# json.mirror_projects_count @projects_mirrior_count \ No newline at end of file diff --git a/dump.rdb b/dump.rdb index 3bcfe7a80bf9bf205f88e2c792e8182b68a9ba9f..d12a997bb2edb6066fc2b7e61459c1543e833750 100644 GIT binary patch delta 337 zcmZ3%cAs;Cf#B`~ui}1jloqF^=;o&89!kib=qSoADf&leYgzTgSSc1mivtW3BfMCe zYF<=LW@MD(Fh9WXXXTX2WS}Icp)rsX&0?PqjKLCiJfYk2vj&ZfRROviLJ0SwKTPukv%0fEwMDG6w{Xn3$PNUd8xq@%Q>;yi^XZqqp->I8099nFf*;)oj^U|`@bE=er0N=wYlNliJx_y;66u|bN{5GePDiJN!DWFuw=K|w=POG8Uj zb0ae|JyS~)1JlVZ%+JJ_*a}NiOH+#(*;7)}5=(PR{(!6j>ox!yb2FPJDG@QJb fQA3)64{TFGQGRl2G0=?%%>N%{w7SZg9c2apIq5{v