mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
fix: 修改项目线上玉米和基本路径无法修改的bug
This commit is contained in:
parent
110548ba6b
commit
9db330d1dd
@ -26,7 +26,7 @@ class projectController extends baseController {
|
||||
|
||||
verifyDomain(domain){
|
||||
if(!domain) return false;
|
||||
if(/^[a-zA-Z0-9\-_\.]+[a-zA-Z]{2,6}$/.test(domain)){
|
||||
if(/^[a-zA-Z0-9\-_\.]+?\.[a-zA-Z0-9\-_\.]*?[a-zA-Z]{2,6}$/.test(domain)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -332,7 +332,7 @@ class projectController extends baseController {
|
||||
|
||||
let projectData = await this.Model.get(id);
|
||||
|
||||
if(params.basepath = (this.handleBasepath(params.basepath)) === false){
|
||||
if((params.basepath = this.handleBasepath(params.basepath)) === false){
|
||||
return ctx.body = yapi.commons.resReturn(null, 401, 'basepath格式有误')
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ var projectController = function (_baseController) {
|
||||
key: 'verifyDomain',
|
||||
value: function verifyDomain(domain) {
|
||||
if (!domain) return false;
|
||||
if (/^[a-zA-Z0-9\-_\.]+[a-zA-Z]{2,6}$/.test(domain)) {
|
||||
if (/^[a-zA-Z0-9\-_\.]+?\.[a-zA-Z0-9\-_\.]*?[a-zA-Z]{2,6}$/.test(domain)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -778,7 +778,7 @@ var projectController = function (_baseController) {
|
||||
case 12:
|
||||
projectData = _context8.sent;
|
||||
|
||||
if (!(params.basepath = this.handleBasepath(params.basepath) === false)) {
|
||||
if (!((params.basepath = this.handleBasepath(params.basepath)) === false)) {
|
||||
_context8.next = 15;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user