Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
sean 2017-08-24 21:18:19 +08:00
commit eda0ca7053
14 changed files with 84 additions and 82 deletions

View File

@ -8,7 +8,7 @@ import URL from 'url';
import './Postman.scss'
// const { TextArea } = Input;
const { TextArea } = Input;
const InputGroup = Input.Group;
const Option = Select.Option;
const Panel = Collapse.Panel;
@ -25,8 +25,8 @@ export default class Run extends Component {
}
state = {
res: '',
resHeader: '',
res: {},
resHeader: {},
method: 'GET',
domains: [],
pathname: '',
@ -55,7 +55,7 @@ export default class Run extends Component {
componentDidMount() {
const { bodyType } = this.state;
if(bodyType !== 'file' && bodyType !== 'form') {
if(bodyType && bodyType !== 'file' && bodyType !== 'form') {
this.loadBodyEditor()
}
}
@ -109,7 +109,7 @@ export default class Run extends Component {
bodyType: req_body_type || 'form',
loading: false
}, () => {
if(req_body_type !== 'file' && req_body_type !== 'form') {
if(req_body_type && req_body_type !== 'file' && req_body_type !== 'form') {
this.loadBodyEditor()
}
});
@ -404,8 +404,9 @@ export default class Run extends Component {
render () {
const { method, domains, pathParam, pathname, query, headers, bodyForm, currDomain, bodyType } = this.state;
const { method, domains, pathParam, pathname, query, headers, bodyForm, currDomain, bodyType, resHeader } = this.state;
const hasPlugin = this.hasCrossRequestPlugin();
const isResJson = resHeader['content-type'] && resHeader['content-type'].indexOf('application/json') !== -1
let path = pathname;
pathParam.forEach(item => {
path = path.replace(`:${item.name}`, item.value || `:${item.name}`);
@ -580,11 +581,12 @@ export default class Run extends Component {
<div className="res-code"></div>
<Collapse defaultActiveKey={['0', '1']} bordered={true}>
<Panel header="BODY" key="0" >
{/*<TextArea
<div id="res-body-pretty" className="pretty-editor" style={{display: isResJson ? '' : 'none'}}></div>
<TextArea
style={{display: isResJson ? 'none' : ''}}
value={typeof this.state.res === 'object' ? JSON.stringify(this.state.res, null, 2) : this.state.res.toString()}
autosize={{ minRows: 2, maxRows: 10 }}
></TextArea>*/}
<div id="res-body-pretty" className="pretty-editor"></div>
></TextArea>
</Panel>
<Panel header="HEADERS" key="1" >
{/*<TextArea

View File

@ -229,7 +229,7 @@ class interfaceColController extends baseController{
}
let caseData = await this.caseModel.get(params.id);
let auth = await this.checkAuth(caseData.project_id, 'project', 'edit')
let auth = await this.checkAuth(caseData.project_id, 'project', 'edit');
if (!auth) {
return ctx.body = yapi.commons.resReturn(null, 400, '没有权限');
}

View File

@ -72,7 +72,7 @@ app.use(compress({
}));
app.use(function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {

View File

@ -59,7 +59,7 @@ var baseController = function () {
(0, _createClass3.default)(baseController, [{
key: 'init',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var ignoreRouter;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -103,7 +103,7 @@ var baseController = function () {
}, {
key: 'checkLogin',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var token, uid, userInst, result, decoded;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -170,7 +170,7 @@ var baseController = function () {
}, {
key: 'getLoginStatus',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -222,7 +222,7 @@ var baseController = function () {
}, {
key: 'getProjectRole',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(id, type) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(id, type) {
var _this = this;
var result, interfaceInst, interfaceData, projectInst, projectData, memberData, groupInst, groupData, groupMemberData;
@ -379,7 +379,7 @@ var baseController = function () {
}, {
key: 'checkAuth',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(id, type, action) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(id, type, action) {
var role;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {

View File

@ -74,7 +74,7 @@ var followController = function (_baseController) {
(0, _createClass3.default)(followController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var uid, page, limit, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -139,7 +139,7 @@ var followController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, uid, checkRepeat, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -217,7 +217,7 @@ var followController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var params, uid, checkRepeat, project, data, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {

View File

@ -88,7 +88,7 @@ var groupController = function (_baseController) {
(0, _createClass3.default)(groupController, [{
key: 'get',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var params, groupInst, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -160,7 +160,7 @@ var groupController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, groupUserdata, groupInst, checkRepeat, data, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -272,7 +272,7 @@ var groupController = function (_baseController) {
}, {
key: 'getUserdata',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(uid, role) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(uid, role) {
var userInst, userData;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -333,7 +333,7 @@ var groupController = function (_baseController) {
}, {
key: 'addMember',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var params, groupInst, check, groupUserdata, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -446,7 +446,7 @@ var groupController = function (_baseController) {
}, {
key: 'changeMemberRole',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, groupInst, check, result;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -547,7 +547,7 @@ var groupController = function (_baseController) {
}, {
key: 'getMemberList',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, groupInst, group;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -611,7 +611,7 @@ var groupController = function (_baseController) {
}, {
key: 'delMember',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var params, groupInst, check, result;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -709,7 +709,7 @@ var groupController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var groupInst, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -762,7 +762,7 @@ var groupController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _this2 = this;
var groupInst, projectInst, interfaceInst, interfaceColInst, interfaceCaseInst, _id, projectList, result;
@ -802,7 +802,7 @@ var groupController = function (_baseController) {
projectList = _context10.sent;
projectList.forEach(function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(p) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(p) {
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
@ -881,7 +881,7 @@ var groupController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var groupInst, _id2, data, result;
return _regenerator2.default.wrap(function _callee11$(_context11) {

View File

@ -105,7 +105,7 @@ var interfaceController = function (_baseController) {
(0, _createClass3.default)(interfaceController, [{
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var _this2 = this;
var params, auth, checkRepeat, data, result;
@ -273,7 +273,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, result;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -335,7 +335,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var project_id, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -385,7 +385,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByCat',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var catid, result;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -435,7 +435,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'listByMenu',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var project_id, result, newResult, i, item, list, j;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -540,7 +540,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var _this3 = this;
var params, id, interfaceData, auth, checkRepeat, data, result, username, cateid;
@ -747,7 +747,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var _this4 = this;
var id, data, auth, inter, result, username;
@ -840,7 +840,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'solveConflict',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _this5 = this;
var id, result, userInst, userinfo, data;
@ -923,7 +923,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'addCat',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var params, auth, result, username;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -1018,7 +1018,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'upCat',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var params, result, username, cate, auth;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -1090,7 +1090,7 @@ var interfaceController = function (_baseController) {
}, {
key: 'delCat',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var id, catData, auth, username, result, r;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {

View File

@ -74,7 +74,7 @@ var interfaceColController = function (_baseController) {
(0, _createClass3.default)(interfaceColController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var id, result, i;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -149,7 +149,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'addCol',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, auth, result, username;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -255,7 +255,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'getCaseList',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var id, inst, result;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -319,7 +319,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'addCase',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ctx) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(ctx) {
var _this2 = this;
var params, auth, result, username;
@ -448,7 +448,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'upCase',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var _this3 = this;
var params, caseData, auth, result, username;
@ -561,7 +561,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'getCase',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var id, result;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -615,7 +615,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'upCol',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var params, id, colData, auth, result, username;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -700,7 +700,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'upCaseIndex',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var _this4 = this;
var params;
@ -769,7 +769,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'delCol',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var id, colData, auth, result, username;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -855,7 +855,7 @@ var interfaceColController = function (_baseController) {
}, {
key: 'delCase',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _this5 = this;
var caseid, caseData, auth, result, username;

View File

@ -75,7 +75,7 @@ var logController = function (_baseController) {
(0, _createClass3.default)(logController, [{
key: 'list',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var typeid, page, limit, type, result, count;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {

View File

@ -148,7 +148,7 @@ var projectController = function (_baseController) {
}, {
key: 'add',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var params, checkRepeat, data, result, colInst, catInst, username;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -321,7 +321,7 @@ var projectController = function (_baseController) {
}, {
key: 'addMember',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
var params, check, userdata, result, username;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
@ -444,7 +444,7 @@ var projectController = function (_baseController) {
}, {
key: 'delMember',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var _this2 = this;
var params, check, result, username;
@ -542,7 +542,7 @@ var projectController = function (_baseController) {
}, {
key: 'getUserdata',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(uid, role) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(uid, role) {
var userInst, userData;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -600,7 +600,7 @@ var projectController = function (_baseController) {
}, {
key: 'getMemberList',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, project;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -662,7 +662,7 @@ var projectController = function (_baseController) {
}, {
key: 'get',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var params, result, catInst, cat;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -747,7 +747,7 @@ var projectController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var group_id, auth, result, follow, uids, _users, users;
return _regenerator2.default.wrap(function _callee7$(_context7) {
@ -847,7 +847,7 @@ var projectController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var id, interfaceInst, interfaceColInst, interfaceCaseInst, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -940,7 +940,7 @@ var projectController = function (_baseController) {
}, {
key: 'changeMemberRole',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var _this3 = this;
var params, projectInst, check, result, username;
@ -1056,7 +1056,7 @@ var projectController = function (_baseController) {
}, {
key: 'upSet',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var _this4 = this;
var id, data, result;
@ -1146,7 +1146,7 @@ var projectController = function (_baseController) {
}, {
key: 'up',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var id, params, projectData, checkRepeat, data, result, username;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
@ -1292,7 +1292,7 @@ var projectController = function (_baseController) {
}, {
key: 'search',
value: function () {
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var q, projectList, groupList, projectRules, groupRules, queryList;
return _regenerator2.default.wrap(function _callee12$(_context12) {
while (1) {
@ -1367,7 +1367,7 @@ var projectController = function (_baseController) {
}, {
key: 'download',
value: function () {
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var project_id, interfaceInst, count, arr, fileName, res;
return _regenerator2.default.wrap(function _callee13$(_context13) {
while (1) {

View File

@ -99,7 +99,7 @@ var userController = function (_baseController) {
(0, _createClass3.default)(userController, [{
key: 'login',
value: function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var userInst, email, password, result;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
@ -190,7 +190,7 @@ var userController = function (_baseController) {
}, {
key: 'logout',
value: function () {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
@ -248,7 +248,7 @@ var userController = function (_baseController) {
}, {
key: 'loginByToken',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) {
var config, token, ret, login;
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
@ -300,7 +300,7 @@ var userController = function (_baseController) {
}, {
key: 'handleThirdLogin',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(email, username) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(email, username) {
var user, data, passsalt, userInst;
return _regenerator2.default.wrap(function _callee4$(_context4) {
while (1) {
@ -384,7 +384,7 @@ var userController = function (_baseController) {
}, {
key: 'changePassword',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(ctx) {
var params, userInst, user, passsalt, data, result;
return _regenerator2.default.wrap(function _callee5$(_context5) {
while (1) {
@ -512,7 +512,7 @@ var userController = function (_baseController) {
}, {
key: 'reg',
value: function () {
var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) {
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) {
var userInst, params, checkRepeat, passsalt, data, user;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
@ -636,7 +636,7 @@ var userController = function (_baseController) {
}, {
key: 'list',
value: function () {
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) {
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) {
var page, limit, userInst, user, count;
return _regenerator2.default.wrap(function _callee7$(_context7) {
while (1) {
@ -694,7 +694,7 @@ var userController = function (_baseController) {
}, {
key: 'findById',
value: function () {
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) {
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) {
var userInst, id, result;
return _regenerator2.default.wrap(function _callee8$(_context8) {
while (1) {
@ -770,7 +770,7 @@ var userController = function (_baseController) {
}, {
key: 'del',
value: function () {
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) {
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) {
var userInst, id, result;
return _regenerator2.default.wrap(function _callee9$(_context9) {
while (1) {
@ -846,7 +846,7 @@ var userController = function (_baseController) {
}, {
key: 'update',
value: function () {
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) {
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
var params, userInst, id, data, checkRepeat, result;
return _regenerator2.default.wrap(function _callee10$(_context10) {
while (1) {
@ -952,7 +952,7 @@ var userController = function (_baseController) {
}, {
key: 'uploadAvatar',
value: function () {
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(ctx) {
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(ctx) {
var basecode, pngPrefix, jpegPrefix, type, strLength, avatarInst, result;
return _regenerator2.default.wrap(function _callee11$(_context11) {
while (1) {
@ -1054,7 +1054,7 @@ var userController = function (_baseController) {
}, {
key: 'avatar',
value: function () {
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee12(ctx) {
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(ctx) {
var uid, avatarInst, data, dataBuffer, type;
return _regenerator2.default.wrap(function _callee12$(_context12) {
while (1) {
@ -1118,7 +1118,7 @@ var userController = function (_baseController) {
}, {
key: 'search',
value: function () {
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee13(ctx) {
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(ctx) {
var q, queryList, rules, filteredRes;
return _regenerator2.default.wrap(function _callee13$(_context13) {
while (1) {
@ -1190,7 +1190,7 @@ var userController = function (_baseController) {
}, {
key: 'project',
value: function () {
var _ref14 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee14(ctx) {
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(ctx) {
var _ctx$request$query, id, type, result, interfaceInst, interfaceData, projectInst, projectData, ownerAuth, devAuth, groupInst, groupData, _ownerAuth, _devAuth;
return _regenerator2.default.wrap(function _callee14$(_context14) {

View File

@ -47,7 +47,7 @@ function matchApi(apiPath, apiRule) {
}
module.exports = function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx, next) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx, next) {
var hostname, config, path, paths, projectId, projectInst, project, interfaceData, newData, newpath, interfaceInst, _newData, findInterface, res;
return _regenerator2.default.wrap(function _callee$(_context) {

View File

@ -355,7 +355,7 @@ function createAction(controller, action, path, method) {
var _this = this;
router[method]("/api" + INTERFACE_CONFIG[controller].prefix + path, function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var inst;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {

View File

@ -26,7 +26,7 @@ function websocket(app) {
return next(ctx);
});
router.get('/api/interface/solve_conflict', function () {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) {
var inst;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {