Merge branch 'develop' of http://git.trustie.net/jasder/forgeplus into develop

This commit is contained in:
sylor_huang@126.com 2020-03-20 16:52:41 +08:00
commit f397aecee2
4 changed files with 3 additions and 3 deletions

View File

@ -85,6 +85,7 @@ class Project < ApplicationRecord
puts project.id
next if project.owner.blank?
if project.repository.blank?
puts "########### start create repositoy #############"
Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id)
end
end

View File

@ -22,7 +22,7 @@ class User < ApplicationRecord
EDU_NORMAL = 8 # 普通用户
VALID_EMAIL_REGEX = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/i
# VALID_PHONE_REGEX = /^1\d{10}$/
VALID_PHONE_REGEX = /^1\d{10}$/
# 身份证
VALID_NUMBER_REGEX = /(^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^([A-Z]\d{6,10}(\(\w{1}\))?)$)/

View File

@ -10,7 +10,7 @@ class Projects::ListQuery < ApplicationQuery
end
def call
scope = Project.like(params[:search])
scope = Project.visible.like(params[:search])
.with_project_type(params[:project_type])
.with_project_category(params[:category_id])
.with_project_language(params[:language_id])

View File

@ -5,4 +5,3 @@ json.grade user.grade
json.identity user&.user_extension&.identity
# json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开
json.image_url url_to_avatar(user)
json.school user.school_name