Commit 7cbc5106 authored by 温海元's avatar 温海元

modify the rule for create

parent 910f0a46
...@@ -56,10 +56,10 @@ const save = async function (ctx) { ...@@ -56,10 +56,10 @@ const save = async function (ctx) {
// 支持中文域名 // 支持中文域名
const match = data.git_path.match(/(?<=@)([A-Z0-9a-z\u4e00-\u9fa5-\.]+):([\w-\.]+)\/(.*).git$/) const match = data.git_path.match(/(?<=@)([A-Z0-9a-z\u4e00-\u9fa5-\.]+):([\w-\.]+)\/(.*).git$/)
//if (!match || match.length !== 4) { //if (!match || match.length !== 4) {
if (match.length !== 4) { // if (match.length !== 4) {
ctx.body = ctx.fail(ctx.Code.ERROR_GITPATH) // ctx.body = ctx.fail(ctx.Code.ERROR_GITPATH)
return // return
} // }
if (data.host_name && ~data.host_name.indexOf('://')) { if (data.host_name && ~data.host_name.indexOf('://')) {
ctx.body = ctx.fail('线上域名不要有 http://') ctx.body = ctx.fail('线上域名不要有 http://')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment