mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
f03755c2d9
@ -76,5 +76,6 @@ export default {
|
|||||||
'fork',
|
'fork',
|
||||||
'android-o',
|
'android-o',
|
||||||
'apple-o'
|
'apple-o'
|
||||||
]
|
],
|
||||||
|
HTTP_REQUEST_HEADER: ["Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Datetime", "Authorization", "Cache-Control", "Connection", "Cookie", "Content-Disposition", "Content-Length", "Content-MD5", "Content-Type", "Date", "Expect", "From", "Host", "If-Match", "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Max-Forwards", "Origin", "Pragma", "Proxy-Authorization", "Range", "Referer", "TE", "User-Agent", "Upgrade", "Via", "Warning", "X-Requested-With", "DNT", "X-Forwarded-For", "X-Forwarded-Host", "X-Forwarded-Proto", "Front-End-Https", "X-Http-Method-Override", "X-ATT-DeviceId", "X-Wap-Profile", "Proxy-Connection", "X-UIDH", "X-Csrf-Token"]
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
.case-delete-icon{
|
.case-delete-icon{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
i:before{
|
||||||
|
line-height: 17px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.menu-title:hover {
|
.menu-title:hover {
|
||||||
.case-delete-icon {
|
.case-delete-icon {
|
||||||
|
@ -11,4 +11,7 @@
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
}
|
}
|
||||||
|
.ant-select-selection__rendered{
|
||||||
|
line-height: 34px;
|
||||||
|
}
|
||||||
}
|
}
|
@ -408,7 +408,7 @@ class InterfaceEditForm extends Component {
|
|||||||
{getFieldDecorator('path', {
|
{getFieldDecorator('path', {
|
||||||
initialValue: this.state.path,
|
initialValue: this.state.path,
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '清输入接口路径!'
|
required: true, message: '请输入接口路径!'
|
||||||
}]
|
}]
|
||||||
})(
|
})(
|
||||||
<Input onBlur={this.handlePath} placeholder="/path" style={{ width: '60%' }} />
|
<Input onBlur={this.handlePath} placeholder="/path" style={{ width: '60%' }} />
|
||||||
|
@ -43,6 +43,10 @@ class View extends Component {
|
|||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name'
|
key: 'name'
|
||||||
}, {
|
}, {
|
||||||
|
title: '参数类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
key: 'type'
|
||||||
|
},{
|
||||||
title: '是否必须',
|
title: '是否必须',
|
||||||
dataIndex: 'required',
|
dataIndex: 'required',
|
||||||
key: 'required'
|
key: 'required'
|
||||||
@ -60,7 +64,8 @@ class View extends Component {
|
|||||||
key: i,
|
key: i,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: item.desc,
|
value: item.desc,
|
||||||
required: item.required?"必须":"非必须"
|
required: item.required?"必须":"非必须",
|
||||||
|
type: item.type === "text"?"文本":"文件"
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -224,8 +229,14 @@ class View extends Component {
|
|||||||
done: "完成"
|
done: "完成"
|
||||||
}
|
}
|
||||||
let statusColor = {
|
let statusColor = {
|
||||||
undone: "rgb(255, 85, 0)",
|
undone: {
|
||||||
done: "#cfefdf"
|
bac: "rgb(255, 85, 0)",
|
||||||
|
color: "white"
|
||||||
|
},
|
||||||
|
done:{
|
||||||
|
bac: "rgb(135, 208, 104)",
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let methodColor = {
|
let methodColor = {
|
||||||
post: {
|
post: {
|
||||||
@ -236,28 +247,29 @@ class View extends Component {
|
|||||||
bac: "#cfefdf",
|
bac: "#cfefdf",
|
||||||
color: "#00a854"
|
color: "#00a854"
|
||||||
},
|
},
|
||||||
input: {
|
put: {
|
||||||
bac: "#57cf27",
|
bac: "#fff3cf",
|
||||||
color: "#9c82a2"
|
color: "#ffbf00"
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
bac: "#57cf27",
|
bac: "#fcdbd9",
|
||||||
color: "#57cf27"
|
color: "#f04134"
|
||||||
},
|
},
|
||||||
head: {
|
head: {
|
||||||
bac: "#d4d5f7",
|
bac: "#fff3cf",
|
||||||
color: "#0b47ef"
|
color: "#ffbf00"
|
||||||
},
|
},
|
||||||
patch: {
|
patch: {
|
||||||
bac: "#f9f4e1",
|
bac: "#fff3cf",
|
||||||
color: "#fac200"
|
color: "#ffbf00"
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
bac: "#f7cdf5",
|
bac: "#fff3cf",
|
||||||
color: "#fa00f2"
|
color: "#ffbf00"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
methodColor = methodColor[this.props.curData.method?this.props.curData.method.toLowerCase():"get"];
|
methodColor = methodColor[this.props.curData.method?this.props.curData.method.toLowerCase():"get"];
|
||||||
|
statusColor = statusColor[this.props.curData.status?this.props.curData.status.toLowerCase():"undone"]
|
||||||
if(!methodColor) methodColor = "get";
|
if(!methodColor) methodColor = "get";
|
||||||
let res = <div className="caseContainer">
|
let res = <div className="caseContainer">
|
||||||
<div className="colName">
|
<div className="colName">
|
||||||
@ -266,7 +278,7 @@ class View extends Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="colMethod">
|
<div className="colMethod">
|
||||||
<span className="colKey">请求方法:</span>
|
<span className="colKey">请求方法:</span>
|
||||||
<span style={{color:methodColor,backgroundColor:methodColor.bac}} className="colValue">{this.props.curData.method}</span>
|
<span style={{color:methodColor.color,backgroundColor:methodColor.bac}} className="colValue">{this.props.curData.method}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="colPath">
|
<div className="colPath">
|
||||||
<span className="colKey">接口路径:</span>
|
<span className="colKey">接口路径:</span>
|
||||||
@ -274,7 +286,7 @@ class View extends Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="colstatus">
|
<div className="colstatus">
|
||||||
<span className="colKey">状态:</span>
|
<span className="colKey">状态:</span>
|
||||||
<span style={{backgroundColor:statusColor[this.props.curData.status]}} className="colValue">{status[this.props.curData.status]}</span>
|
<span style={{backgroundColor:statusColor.bac,color: statusColor.color}} className="colValue">{status[this.props.curData.status]}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="colAddTime">
|
<div className="colAddTime">
|
||||||
<span className="colKey">创建时间:</span>
|
<span className="colKey">创建时间:</span>
|
||||||
|
@ -307,28 +307,28 @@ class interfaceController extends baseController {
|
|||||||
up_time: yapi.commons.time()
|
up_time: yapi.commons.time()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (params.path) {
|
if (!_.isUndefined(params.path)) {
|
||||||
data.path = params.path;
|
data.path = params.path;
|
||||||
}
|
}
|
||||||
if (params.title) {
|
if (!_.isUndefined(params.title)) {
|
||||||
data.title = params.title;
|
data.title = params.title;
|
||||||
}
|
}
|
||||||
if (params.desc) {
|
if (!_.isUndefined(params.desc)) {
|
||||||
data.desc = params.desc;
|
data.desc = params.desc;
|
||||||
}
|
}
|
||||||
if (params.method) {
|
if (!_.isUndefined(params.method)) {
|
||||||
data.method = params.method;
|
data.method = params.method;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.catid) {
|
if (!_.isUndefined(params.catid)) {
|
||||||
data.catid = params.catid;
|
data.catid = params.catid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_headers) {
|
if (!_.isUndefined(params.req_headers)) {
|
||||||
data.req_headers = params.req_headers;
|
data.req_headers = params.req_headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_body_form) {
|
if (!_.isUndefined(params.req_body_form)) {
|
||||||
data.req_body_form = params.req_body_form;
|
data.req_body_form = params.req_body_form;
|
||||||
}
|
}
|
||||||
if (params.req_params && Array.isArray(params.req_params) && params.req_params.length > 0) {
|
if (params.req_params && Array.isArray(params.req_params) && params.req_params.length > 0) {
|
||||||
@ -338,25 +338,25 @@ class interfaceController extends baseController {
|
|||||||
data.type = 'static'
|
data.type = 'static'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_query) {
|
if (!_.isUndefined(params.req_query)) {
|
||||||
data.req_query = params.req_query;
|
data.req_query = params.req_query;
|
||||||
}
|
}
|
||||||
if (params.req_body_other) {
|
if (!_.isUndefined(params.req_body_other)) {
|
||||||
data.req_body_other = params.req_body_other;
|
data.req_body_other = params.req_body_other;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_body_type) {
|
if (!_.isUndefined(params.req_body_type)) {
|
||||||
data.req_body_type = params.req_body_type;
|
data.req_body_type = params.req_body_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.res_body_type) {
|
if (!_.isUndefined(params.res_body_type)) {
|
||||||
data.res_body_type = params.res_body_type;
|
data.res_body_type = params.res_body_type;
|
||||||
}
|
}
|
||||||
if (params.res_body) {
|
if (!_.isUndefined(params.res_body)) {
|
||||||
data.res_body = params.res_body;
|
data.res_body = params.res_body;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.status) {
|
if (!_.isUndefined(params.status)) {
|
||||||
data.status = params.status;
|
data.status = params.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,14 +560,12 @@ class projectController extends baseController {
|
|||||||
data.project_type = params.project_type
|
data.project_type = params.project_type
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.name) data.name = params.name;
|
if (!_.isUndefined(params.name)) data.name = params.name;
|
||||||
if (params.desc) data.desc = params.desc;
|
if (!_.isUndefined(params.desc)) data.desc = params.desc;
|
||||||
if (params.basepath) {
|
data.basepath = params.basepath;
|
||||||
data.basepath = params.basepath;
|
if (!_.isUndefined(params.env)) data.env = params.env;
|
||||||
}
|
if (!_.isUndefined(params.color)) data.color = params.color;
|
||||||
if (params.env) data.env = params.env;
|
if (!_.isUndefined(params.icon)) data.icon = params.icon;
|
||||||
if (params.color) data.color = params.color;
|
|
||||||
if (params.icon) data.icon = params.icon;
|
|
||||||
let result = await this.Model.up(id, data);
|
let result = await this.Model.up(id, data);
|
||||||
let username = this.getUsername();
|
let username = this.getUsername();
|
||||||
yapi.commons.saveLog({
|
yapi.commons.saveLog({
|
||||||
|
@ -114,7 +114,7 @@ var interfaceController = function (_baseController) {
|
|||||||
(0, _createClass3.default)(interfaceController, [{
|
(0, _createClass3.default)(interfaceController, [{
|
||||||
key: 'add',
|
key: 'add',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
|
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
var params, auth, checkRepeat, data, paths, name, i, result;
|
var params, auth, checkRepeat, data, paths, name, i, result;
|
||||||
@ -300,7 +300,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'get',
|
key: 'get',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
|
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
|
||||||
var params, result;
|
var params, result;
|
||||||
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -362,7 +362,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'list',
|
key: 'list',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
|
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
|
||||||
var project_id, result;
|
var project_id, result;
|
||||||
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -412,7 +412,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'listByCat',
|
key: 'listByCat',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
|
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
|
||||||
var catid, result;
|
var catid, result;
|
||||||
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -462,7 +462,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'listByMenu',
|
key: 'listByMenu',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
|
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
|
||||||
var project_id, result, newResult, i, item, list, j;
|
var project_id, result, newResult, i, item, list, j;
|
||||||
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -567,7 +567,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'up',
|
key: 'up',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
|
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var params, id, interfaceData, auth, checkRepeat, data, result, username, cateid;
|
var params, id, interfaceData, auth, checkRepeat, data, result, username, cateid;
|
||||||
@ -649,28 +649,28 @@ var interfaceController = function (_baseController) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (params.path) {
|
if (!_underscore2.default.isUndefined(params.path)) {
|
||||||
data.path = params.path;
|
data.path = params.path;
|
||||||
}
|
}
|
||||||
if (params.title) {
|
if (!_underscore2.default.isUndefined(params.title)) {
|
||||||
data.title = params.title;
|
data.title = params.title;
|
||||||
}
|
}
|
||||||
if (params.desc) {
|
if (!_underscore2.default.isUndefined(params.desc)) {
|
||||||
data.desc = params.desc;
|
data.desc = params.desc;
|
||||||
}
|
}
|
||||||
if (params.method) {
|
if (!_underscore2.default.isUndefined(params.method)) {
|
||||||
data.method = params.method;
|
data.method = params.method;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.catid) {
|
if (!_underscore2.default.isUndefined(params.catid)) {
|
||||||
data.catid = params.catid;
|
data.catid = params.catid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_headers) {
|
if (!_underscore2.default.isUndefined(params.req_headers)) {
|
||||||
data.req_headers = params.req_headers;
|
data.req_headers = params.req_headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_body_form) {
|
if (!_underscore2.default.isUndefined(params.req_body_form)) {
|
||||||
data.req_body_form = params.req_body_form;
|
data.req_body_form = params.req_body_form;
|
||||||
}
|
}
|
||||||
if (params.req_params && Array.isArray(params.req_params) && params.req_params.length > 0) {
|
if (params.req_params && Array.isArray(params.req_params) && params.req_params.length > 0) {
|
||||||
@ -680,25 +680,25 @@ var interfaceController = function (_baseController) {
|
|||||||
data.type = 'static';
|
data.type = 'static';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_query) {
|
if (!_underscore2.default.isUndefined(params.req_query)) {
|
||||||
data.req_query = params.req_query;
|
data.req_query = params.req_query;
|
||||||
}
|
}
|
||||||
if (params.req_body_other) {
|
if (!_underscore2.default.isUndefined(params.req_body_other)) {
|
||||||
data.req_body_other = params.req_body_other;
|
data.req_body_other = params.req_body_other;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.req_body_type) {
|
if (!_underscore2.default.isUndefined(params.req_body_type)) {
|
||||||
data.req_body_type = params.req_body_type;
|
data.req_body_type = params.req_body_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.res_body_type) {
|
if (!_underscore2.default.isUndefined(params.res_body_type)) {
|
||||||
data.res_body_type = params.res_body_type;
|
data.res_body_type = params.res_body_type;
|
||||||
}
|
}
|
||||||
if (params.res_body) {
|
if (!_underscore2.default.isUndefined(params.res_body)) {
|
||||||
data.res_body = params.res_body;
|
data.res_body = params.res_body;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.status) {
|
if (!_underscore2.default.isUndefined(params.status)) {
|
||||||
data.status = params.status;
|
data.status = params.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'del',
|
key: 'del',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
|
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
|
||||||
var _this4 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
var id, data, auth, inter, result, username;
|
var id, data, auth, inter, result, username;
|
||||||
@ -870,7 +870,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'solveConflict',
|
key: 'solveConflict',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
|
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
|
||||||
var _this5 = this;
|
var _this5 = this;
|
||||||
|
|
||||||
var id, result, userInst, userinfo, data;
|
var id, result, userInst, userinfo, data;
|
||||||
@ -953,7 +953,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'addCat',
|
key: 'addCat',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
|
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
|
||||||
var params, auth, result, username;
|
var params, auth, result, username;
|
||||||
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -1048,7 +1048,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'upCat',
|
key: 'upCat',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
|
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
|
||||||
var params, result, username, cate, auth;
|
var params, result, username, cate, auth;
|
||||||
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -1120,7 +1120,7 @@ var interfaceController = function (_baseController) {
|
|||||||
}, {
|
}, {
|
||||||
key: 'delCat',
|
key: 'delCat',
|
||||||
value: function () {
|
value: function () {
|
||||||
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
|
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
|
||||||
var id, catData, auth, username, result, r;
|
var id, catData, auth, username, result, r;
|
||||||
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -1285,14 +1285,12 @@ var projectController = function (_baseController) {
|
|||||||
data.project_type = params.project_type;
|
data.project_type = params.project_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.name) data.name = params.name;
|
if (!_underscore2.default.isUndefined(params.name)) data.name = params.name;
|
||||||
if (params.desc) data.desc = params.desc;
|
if (!_underscore2.default.isUndefined(params.desc)) data.desc = params.desc;
|
||||||
if (params.basepath) {
|
data.basepath = params.basepath;
|
||||||
data.basepath = params.basepath;
|
if (!_underscore2.default.isUndefined(params.env)) data.env = params.env;
|
||||||
}
|
if (!_underscore2.default.isUndefined(params.color)) data.color = params.color;
|
||||||
if (params.env) data.env = params.env;
|
if (!_underscore2.default.isUndefined(params.icon)) data.icon = params.icon;
|
||||||
if (params.color) data.color = params.color;
|
|
||||||
if (params.icon) data.icon = params.icon;
|
|
||||||
_context12.next = 34;
|
_context12.next = 34;
|
||||||
return this.Model.up(id, data);
|
return this.Model.up(id, data);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user