Merge branch 'develop' of http://git.trustie.net/jasder/forgeplus into develop
This commit is contained in:
commit
f397aecee2
|
@ -85,6 +85,7 @@ class Project < ApplicationRecord
|
||||||
puts project.id
|
puts project.id
|
||||||
next if project.owner.blank?
|
next if project.owner.blank?
|
||||||
if project.repository.blank?
|
if project.repository.blank?
|
||||||
|
puts "########### start create repositoy #############"
|
||||||
Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id)
|
Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,7 +22,7 @@ class User < ApplicationRecord
|
||||||
EDU_NORMAL = 8 # 普通用户
|
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_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}\))?)$)/
|
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}\))?)$)/
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Projects::ListQuery < ApplicationQuery
|
||||||
end
|
end
|
||||||
|
|
||||||
def call
|
def call
|
||||||
scope = Project.like(params[:search])
|
scope = Project.visible.like(params[:search])
|
||||||
.with_project_type(params[:project_type])
|
.with_project_type(params[:project_type])
|
||||||
.with_project_category(params[:category_id])
|
.with_project_category(params[:category_id])
|
||||||
.with_project_language(params[:language_id])
|
.with_project_language(params[:language_id])
|
||||||
|
|
|
@ -5,4 +5,3 @@ json.grade user.grade
|
||||||
json.identity user&.user_extension&.identity
|
json.identity user&.user_extension&.identity
|
||||||
# json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开
|
# json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开
|
||||||
json.image_url url_to_avatar(user)
|
json.image_url url_to_avatar(user)
|
||||||
json.school user.school_name
|
|
Loading…
Reference in New Issue