@azteam/express 1.2.425 → 1.2.427

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,10 +17,10 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
17
17
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
18
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
19
19
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
20
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
21
21
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
23
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
24
24
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
25
25
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
26
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -50,21 +50,19 @@ var AdminController = /*#__PURE__*/function (_Controller) {
50
50
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, res) {
51
51
  var data;
52
52
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53
- while (1) {
54
- switch (_context.prev = _context.next) {
55
- case 0:
56
- _context.next = 2;
57
- return _this.repository.findAll(req.query, {
58
- limit: 2000,
59
- lean: true
60
- });
61
- case 2:
62
- data = _context.sent;
63
- return _context.abrupt("return", res.success(data, _this.guardResponse, _this.allowResponse));
64
- case 4:
65
- case "end":
66
- return _context.stop();
67
- }
53
+ while (1) switch (_context.prev = _context.next) {
54
+ case 0:
55
+ _context.next = 2;
56
+ return _this.repository.findAll(req.query, {
57
+ limit: 2000,
58
+ lean: true
59
+ });
60
+ case 2:
61
+ data = _context.sent;
62
+ return _context.abrupt("return", res.success(data, _this.guardResponse, _this.allowResponse));
63
+ case 4:
64
+ case "end":
65
+ return _context.stop();
68
66
  }
69
67
  }, _callee);
70
68
  }));
@@ -76,20 +74,18 @@ var AdminController = /*#__PURE__*/function (_Controller) {
76
74
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(req, res) {
77
75
  var paginateData;
78
76
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
79
- while (1) {
80
- switch (_context2.prev = _context2.next) {
81
- case 0:
82
- _context2.next = 2;
83
- return _this.repository.find(req.query, _objectSpread(_objectSpread({}, req.paginate), {}, {
84
- lean: true
85
- }));
86
- case 2:
87
- paginateData = _context2.sent;
88
- return _context2.abrupt("return", res.success(paginateData, _this.guardResponse, _this.allowResponse));
89
- case 4:
90
- case "end":
91
- return _context2.stop();
92
- }
77
+ while (1) switch (_context2.prev = _context2.next) {
78
+ case 0:
79
+ _context2.next = 2;
80
+ return _this.repository.find(req.query, _objectSpread(_objectSpread({}, req.paginate), {}, {
81
+ lean: true
82
+ }));
83
+ case 2:
84
+ paginateData = _context2.sent;
85
+ return _context2.abrupt("return", res.success(paginateData, _this.guardResponse, _this.allowResponse));
86
+ case 4:
87
+ case "end":
88
+ return _context2.stop();
93
89
  }
94
90
  }, _callee2);
95
91
  }));
@@ -101,20 +97,18 @@ var AdminController = /*#__PURE__*/function (_Controller) {
101
97
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(req, res) {
102
98
  var paginateData;
103
99
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
104
- while (1) {
105
- switch (_context3.prev = _context3.next) {
106
- case 0:
107
- _context3.next = 2;
108
- return _this.repository.findTrash(req.query, _objectSpread(_objectSpread({}, req.paginate), {}, {
109
- lean: true
110
- }));
111
- case 2:
112
- paginateData = _context3.sent;
113
- return _context3.abrupt("return", res.success(paginateData, _this.guardResponse, _this.allowResponse));
114
- case 4:
115
- case "end":
116
- return _context3.stop();
117
- }
100
+ while (1) switch (_context3.prev = _context3.next) {
101
+ case 0:
102
+ _context3.next = 2;
103
+ return _this.repository.findTrash(req.query, _objectSpread(_objectSpread({}, req.paginate), {}, {
104
+ lean: true
105
+ }));
106
+ case 2:
107
+ paginateData = _context3.sent;
108
+ return _context3.abrupt("return", res.success(paginateData, _this.guardResponse, _this.allowResponse));
109
+ case 4:
110
+ case "end":
111
+ return _context3.stop();
118
112
  }
119
113
  }, _callee3);
120
114
  }));
@@ -126,24 +120,22 @@ var AdminController = /*#__PURE__*/function (_Controller) {
126
120
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(req, res) {
127
121
  var item;
128
122
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
129
- while (1) {
130
- switch (_context4.prev = _context4.next) {
131
- case 0:
132
- _context4.next = 2;
133
- return _this.repository.findOneById(req.params.id);
134
- case 2:
135
- item = _context4.sent;
136
- if (item) {
137
- _context4.next = 5;
138
- break;
139
- }
140
- return _context4.abrupt("return", res.error(_error.NOT_EXISTS));
141
- case 5:
142
- return _context4.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
143
- case 6:
144
- case "end":
145
- return _context4.stop();
146
- }
123
+ while (1) switch (_context4.prev = _context4.next) {
124
+ case 0:
125
+ _context4.next = 2;
126
+ return _this.repository.findOneById(req.params.id);
127
+ case 2:
128
+ item = _context4.sent;
129
+ if (item) {
130
+ _context4.next = 5;
131
+ break;
132
+ }
133
+ return _context4.abrupt("return", res.error(_error.NOT_EXISTS));
134
+ case 5:
135
+ return _context4.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
136
+ case 6:
137
+ case "end":
138
+ return _context4.stop();
147
139
  }
148
140
  }, _callee4);
149
141
  }));
@@ -155,24 +147,22 @@ var AdminController = /*#__PURE__*/function (_Controller) {
155
147
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(req, res) {
156
148
  var item;
157
149
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
158
- while (1) {
159
- switch (_context5.prev = _context5.next) {
160
- case 0:
161
- _context5.next = 2;
162
- return _this.repository.findOneTrashById(req.params.id);
163
- case 2:
164
- item = _context5.sent;
165
- if (item) {
166
- _context5.next = 5;
167
- break;
168
- }
169
- return _context5.abrupt("return", res.error(_error.NOT_EXISTS));
170
- case 5:
171
- return _context5.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
172
- case 6:
173
- case "end":
174
- return _context5.stop();
175
- }
150
+ while (1) switch (_context5.prev = _context5.next) {
151
+ case 0:
152
+ _context5.next = 2;
153
+ return _this.repository.findOneTrashById(req.params.id);
154
+ case 2:
155
+ item = _context5.sent;
156
+ if (item) {
157
+ _context5.next = 5;
158
+ break;
159
+ }
160
+ return _context5.abrupt("return", res.error(_error.NOT_EXISTS));
161
+ case 5:
162
+ return _context5.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
163
+ case 6:
164
+ case "end":
165
+ return _context5.stop();
176
166
  }
177
167
  }, _callee5);
178
168
  }));
@@ -183,14 +173,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
183
173
  _defineProperty(_assertThisInitialized(_this), "methodPostCreate", /*#__PURE__*/function () {
184
174
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(data, user) {
185
175
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
186
- while (1) {
187
- switch (_context6.prev = _context6.next) {
188
- case 0:
189
- return _context6.abrupt("return", _this.repository.createByUser(user.id, data));
190
- case 1:
191
- case "end":
192
- return _context6.stop();
193
- }
176
+ while (1) switch (_context6.prev = _context6.next) {
177
+ case 0:
178
+ return _context6.abrupt("return", _this.repository.createByUser(user.id, data));
179
+ case 1:
180
+ case "end":
181
+ return _context6.stop();
194
182
  }
195
183
  }, _callee6);
196
184
  }));
@@ -201,14 +189,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
201
189
  _defineProperty(_assertThisInitialized(_this), "methodPutModify", /*#__PURE__*/function () {
202
190
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(item, data, user) {
203
191
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
204
- while (1) {
205
- switch (_context7.prev = _context7.next) {
206
- case 0:
207
- return _context7.abrupt("return", item.modify(data, user.id));
208
- case 1:
209
- case "end":
210
- return _context7.stop();
211
- }
192
+ while (1) switch (_context7.prev = _context7.next) {
193
+ case 0:
194
+ return _context7.abrupt("return", item.modify(data, user.id));
195
+ case 1:
196
+ case "end":
197
+ return _context7.stop();
212
198
  }
213
199
  }, _callee7);
214
200
  }));
@@ -220,30 +206,28 @@ var AdminController = /*#__PURE__*/function (_Controller) {
220
206
  var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(req, res) {
221
207
  var item;
222
208
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
223
- while (1) {
224
- switch (_context8.prev = _context8.next) {
225
- case 0:
226
- _context8.next = 2;
227
- return _this.repository.findOneById(req.params.id);
228
- case 2:
229
- item = _context8.sent;
230
- if (item) {
231
- _context8.next = 5;
232
- break;
233
- }
234
- return _context8.abrupt("return", res.error(_error.NOT_EXISTS));
235
- case 5:
236
- _context8.next = 7;
237
- return _this.repository["delete"](item, req.user.id);
238
- case 7:
239
- _context8.next = 9;
240
- return _this.afterDelete(item);
241
- case 9:
242
- return _context8.abrupt("return", res.success(true));
243
- case 10:
244
- case "end":
245
- return _context8.stop();
246
- }
209
+ while (1) switch (_context8.prev = _context8.next) {
210
+ case 0:
211
+ _context8.next = 2;
212
+ return _this.repository.findOneById(req.params.id);
213
+ case 2:
214
+ item = _context8.sent;
215
+ if (item) {
216
+ _context8.next = 5;
217
+ break;
218
+ }
219
+ return _context8.abrupt("return", res.error(_error.NOT_EXISTS));
220
+ case 5:
221
+ _context8.next = 7;
222
+ return _this.repository["delete"](item, req.user.id);
223
+ case 7:
224
+ _context8.next = 9;
225
+ return _this.afterDelete(item);
226
+ case 9:
227
+ return _context8.abrupt("return", res.success(true));
228
+ case 10:
229
+ case "end":
230
+ return _context8.stop();
247
231
  }
248
232
  }, _callee8);
249
233
  }));
@@ -255,27 +239,25 @@ var AdminController = /*#__PURE__*/function (_Controller) {
255
239
  var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(req, res) {
256
240
  var item;
257
241
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
258
- while (1) {
259
- switch (_context9.prev = _context9.next) {
260
- case 0:
261
- _context9.next = 2;
262
- return _this.repository.findOneTrashById(req.params.id);
263
- case 2:
264
- item = _context9.sent;
265
- if (item) {
266
- _context9.next = 5;
267
- break;
268
- }
269
- return _context9.abrupt("return", res.error(_error.NOT_EXISTS));
270
- case 5:
271
- _context9.next = 7;
272
- return _this.repository.restore(item, req.user.id);
273
- case 7:
274
- return _context9.abrupt("return", res.success(true));
275
- case 8:
276
- case "end":
277
- return _context9.stop();
278
- }
242
+ while (1) switch (_context9.prev = _context9.next) {
243
+ case 0:
244
+ _context9.next = 2;
245
+ return _this.repository.findOneTrashById(req.params.id);
246
+ case 2:
247
+ item = _context9.sent;
248
+ if (item) {
249
+ _context9.next = 5;
250
+ break;
251
+ }
252
+ return _context9.abrupt("return", res.error(_error.NOT_EXISTS));
253
+ case 5:
254
+ _context9.next = 7;
255
+ return _this.repository.restore(item, req.user.id);
256
+ case 7:
257
+ return _context9.abrupt("return", res.success(true));
258
+ case 8:
259
+ case "end":
260
+ return _context9.stop();
279
261
  }
280
262
  }, _callee9);
281
263
  }));
@@ -287,31 +269,29 @@ var AdminController = /*#__PURE__*/function (_Controller) {
287
269
  var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(req, res) {
288
270
  var item, oldItem;
289
271
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
290
- while (1) {
291
- switch (_context10.prev = _context10.next) {
292
- case 0:
293
- _context10.next = 2;
294
- return _this.repository.findOneTrashById(req.params.id);
295
- case 2:
296
- item = _context10.sent;
297
- if (item) {
298
- _context10.next = 5;
299
- break;
300
- }
301
- return _context10.abrupt("return", res.error(_error.NOT_EXISTS));
302
- case 5:
303
- oldItem = _lodash["default"].cloneDeep(item);
304
- _context10.next = 8;
305
- return _this.repository.destroy(item.id);
306
- case 8:
307
- _context10.next = 10;
308
- return _this.afterDestroy(oldItem);
309
- case 10:
310
- return _context10.abrupt("return", res.success(true));
311
- case 11:
312
- case "end":
313
- return _context10.stop();
314
- }
272
+ while (1) switch (_context10.prev = _context10.next) {
273
+ case 0:
274
+ _context10.next = 2;
275
+ return _this.repository.findOneTrashById(req.params.id);
276
+ case 2:
277
+ item = _context10.sent;
278
+ if (item) {
279
+ _context10.next = 5;
280
+ break;
281
+ }
282
+ return _context10.abrupt("return", res.error(_error.NOT_EXISTS));
283
+ case 5:
284
+ oldItem = _lodash["default"].cloneDeep(item);
285
+ _context10.next = 8;
286
+ return _this.repository.destroy(item.id);
287
+ case 8:
288
+ _context10.next = 10;
289
+ return _this.afterDestroy(oldItem);
290
+ case 10:
291
+ return _context10.abrupt("return", res.success(true));
292
+ case 11:
293
+ case "end":
294
+ return _context10.stop();
315
295
  }
316
296
  }, _callee10);
317
297
  }));
@@ -400,14 +380,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
400
380
  value: function () {
401
381
  var _beforeCreate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(data) {
402
382
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
403
- while (1) {
404
- switch (_context11.prev = _context11.next) {
405
- case 0:
406
- return _context11.abrupt("return", data);
407
- case 1:
408
- case "end":
409
- return _context11.stop();
410
- }
383
+ while (1) switch (_context11.prev = _context11.next) {
384
+ case 0:
385
+ return _context11.abrupt("return", data);
386
+ case 1:
387
+ case "end":
388
+ return _context11.stop();
411
389
  }
412
390
  }, _callee11);
413
391
  }));
@@ -421,14 +399,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
421
399
  value: function () {
422
400
  var _afterCreate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(item) {
423
401
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
424
- while (1) {
425
- switch (_context12.prev = _context12.next) {
426
- case 0:
427
- return _context12.abrupt("return", item);
428
- case 1:
429
- case "end":
430
- return _context12.stop();
431
- }
402
+ while (1) switch (_context12.prev = _context12.next) {
403
+ case 0:
404
+ return _context12.abrupt("return", item);
405
+ case 1:
406
+ case "end":
407
+ return _context12.stop();
432
408
  }
433
409
  }, _callee12);
434
410
  }));
@@ -448,26 +424,24 @@ var AdminController = /*#__PURE__*/function (_Controller) {
448
424
  var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(req, res) {
449
425
  var data, item;
450
426
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
451
- while (1) {
452
- switch (_context13.prev = _context13.next) {
453
- case 0:
454
- _context13.next = 2;
455
- return _this2.beforeCreate(req.body);
456
- case 2:
457
- data = _context13.sent;
458
- _context13.next = 5;
459
- return _this2.methodPostCreate(data, req.user);
460
- case 5:
461
- item = _context13.sent;
462
- _context13.next = 8;
463
- return _this2.afterCreate(item);
464
- case 8:
465
- item = _context13.sent;
466
- return _context13.abrupt("return", res.success(item, _this2.guardResponse, _this2.allowResponse));
467
- case 10:
468
- case "end":
469
- return _context13.stop();
470
- }
427
+ while (1) switch (_context13.prev = _context13.next) {
428
+ case 0:
429
+ _context13.next = 2;
430
+ return _this2.beforeCreate(req.body);
431
+ case 2:
432
+ data = _context13.sent;
433
+ _context13.next = 5;
434
+ return _this2.methodPostCreate(data, req.user);
435
+ case 5:
436
+ item = _context13.sent;
437
+ _context13.next = 8;
438
+ return _this2.afterCreate(item);
439
+ case 8:
440
+ item = _context13.sent;
441
+ return _context13.abrupt("return", res.success(item, _this2.guardResponse, _this2.allowResponse));
442
+ case 10:
443
+ case "end":
444
+ return _context13.stop();
471
445
  }
472
446
  }, _callee13);
473
447
  }));
@@ -482,14 +456,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
482
456
  value: function () {
483
457
  var _beforeModify = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(data) {
484
458
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
485
- while (1) {
486
- switch (_context14.prev = _context14.next) {
487
- case 0:
488
- return _context14.abrupt("return", data);
489
- case 1:
490
- case "end":
491
- return _context14.stop();
492
- }
459
+ while (1) switch (_context14.prev = _context14.next) {
460
+ case 0:
461
+ return _context14.abrupt("return", data);
462
+ case 1:
463
+ case "end":
464
+ return _context14.stop();
493
465
  }
494
466
  }, _callee14);
495
467
  }));
@@ -503,14 +475,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
503
475
  value: function () {
504
476
  var _afterModify = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(item) {
505
477
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
506
- while (1) {
507
- switch (_context15.prev = _context15.next) {
508
- case 0:
509
- return _context15.abrupt("return", item);
510
- case 1:
511
- case "end":
512
- return _context15.stop();
513
- }
478
+ while (1) switch (_context15.prev = _context15.next) {
479
+ case 0:
480
+ return _context15.abrupt("return", item);
481
+ case 1:
482
+ case "end":
483
+ return _context15.stop();
514
484
  }
515
485
  }, _callee15);
516
486
  }));
@@ -530,33 +500,31 @@ var AdminController = /*#__PURE__*/function (_Controller) {
530
500
  var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(req, res) {
531
501
  var item, data;
532
502
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
533
- while (1) {
534
- switch (_context16.prev = _context16.next) {
535
- case 0:
536
- _context16.next = 2;
537
- return _this3.repository.findOneById(req.params.id);
538
- case 2:
539
- item = _context16.sent;
540
- if (item) {
541
- _context16.next = 5;
542
- break;
543
- }
544
- return _context16.abrupt("return", res.error(_error.NOT_EXISTS));
545
- case 5:
546
- _context16.next = 7;
547
- return _this3.beforeModify(req.body);
548
- case 7:
549
- data = _context16.sent;
550
- item = _this3.methodPutModify(item, data, req.user);
551
- _context16.next = 11;
552
- return _this3.afterModify(item);
553
- case 11:
554
- item = _context16.sent;
555
- return _context16.abrupt("return", res.success(item, _this3.guardResponse, _this3.allowResponse));
556
- case 13:
557
- case "end":
558
- return _context16.stop();
559
- }
503
+ while (1) switch (_context16.prev = _context16.next) {
504
+ case 0:
505
+ _context16.next = 2;
506
+ return _this3.repository.findOneById(req.params.id);
507
+ case 2:
508
+ item = _context16.sent;
509
+ if (item) {
510
+ _context16.next = 5;
511
+ break;
512
+ }
513
+ return _context16.abrupt("return", res.error(_error.NOT_EXISTS));
514
+ case 5:
515
+ _context16.next = 7;
516
+ return _this3.beforeModify(req.body);
517
+ case 7:
518
+ data = _context16.sent;
519
+ item = _this3.methodPutModify(item, data, req.user);
520
+ _context16.next = 11;
521
+ return _this3.afterModify(item);
522
+ case 11:
523
+ item = _context16.sent;
524
+ return _context16.abrupt("return", res.success(item, _this3.guardResponse, _this3.allowResponse));
525
+ case 13:
526
+ case "end":
527
+ return _context16.stop();
560
528
  }
561
529
  }, _callee16);
562
530
  }));
@@ -577,31 +545,29 @@ var AdminController = /*#__PURE__*/function (_Controller) {
577
545
  var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(req, res) {
578
546
  var item;
579
547
  return _regeneratorRuntime().wrap(function _callee17$(_context17) {
580
- while (1) {
581
- switch (_context17.prev = _context17.next) {
582
- case 0:
583
- _context17.next = 2;
584
- return _this4.repository.findOneById(req.params.id);
585
- case 2:
586
- item = _context17.sent;
587
- if (item) {
588
- _context17.next = 5;
589
- break;
590
- }
591
- return _context17.abrupt("return", res.error(_error.NOT_EXISTS));
592
- case 5:
593
- _context17.next = 7;
594
- return item.modifyStatusAvailable(req.user.id);
595
- case 7:
596
- _context17.next = 9;
597
- return _this4.afterModify(item);
598
- case 9:
599
- item = _context17.sent;
600
- return _context17.abrupt("return", res.success(item, _this4.guardResponse, _this4.allowResponse));
601
- case 11:
602
- case "end":
603
- return _context17.stop();
604
- }
548
+ while (1) switch (_context17.prev = _context17.next) {
549
+ case 0:
550
+ _context17.next = 2;
551
+ return _this4.repository.findOneById(req.params.id);
552
+ case 2:
553
+ item = _context17.sent;
554
+ if (item) {
555
+ _context17.next = 5;
556
+ break;
557
+ }
558
+ return _context17.abrupt("return", res.error(_error.NOT_EXISTS));
559
+ case 5:
560
+ _context17.next = 7;
561
+ return item.modifyStatusAvailable(req.user.id);
562
+ case 7:
563
+ _context17.next = 9;
564
+ return _this4.afterModify(item);
565
+ case 9:
566
+ item = _context17.sent;
567
+ return _context17.abrupt("return", res.success(item, _this4.guardResponse, _this4.allowResponse));
568
+ case 11:
569
+ case "end":
570
+ return _context17.stop();
605
571
  }
606
572
  }, _callee17);
607
573
  }));
@@ -622,31 +588,29 @@ var AdminController = /*#__PURE__*/function (_Controller) {
622
588
  var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(req, res) {
623
589
  var item;
624
590
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
625
- while (1) {
626
- switch (_context18.prev = _context18.next) {
627
- case 0:
628
- _context18.next = 2;
629
- return _this5.repository.findOneById(req.params.id);
630
- case 2:
631
- item = _context18.sent;
632
- if (item) {
633
- _context18.next = 5;
634
- break;
635
- }
636
- return _context18.abrupt("return", res.error(_error.NOT_EXISTS));
637
- case 5:
638
- _context18.next = 7;
639
- return item.modifyStatusUnavailable(req.body.message, req.user.id);
640
- case 7:
641
- _context18.next = 9;
642
- return _this5.afterModify(item);
643
- case 9:
644
- item = _context18.sent;
645
- return _context18.abrupt("return", res.success(item, _this5.guardResponse, _this5.allowResponse));
646
- case 11:
647
- case "end":
648
- return _context18.stop();
649
- }
591
+ while (1) switch (_context18.prev = _context18.next) {
592
+ case 0:
593
+ _context18.next = 2;
594
+ return _this5.repository.findOneById(req.params.id);
595
+ case 2:
596
+ item = _context18.sent;
597
+ if (item) {
598
+ _context18.next = 5;
599
+ break;
600
+ }
601
+ return _context18.abrupt("return", res.error(_error.NOT_EXISTS));
602
+ case 5:
603
+ _context18.next = 7;
604
+ return item.modifyStatusUnavailable(req.body.message, req.user.id);
605
+ case 7:
606
+ _context18.next = 9;
607
+ return _this5.afterModify(item);
608
+ case 9:
609
+ item = _context18.sent;
610
+ return _context18.abrupt("return", res.success(item, _this5.guardResponse, _this5.allowResponse));
611
+ case 11:
612
+ case "end":
613
+ return _context18.stop();
650
614
  }
651
615
  }, _callee18);
652
616
  }));
@@ -667,31 +631,29 @@ var AdminController = /*#__PURE__*/function (_Controller) {
667
631
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(req, res) {
668
632
  var item;
669
633
  return _regeneratorRuntime().wrap(function _callee19$(_context19) {
670
- while (1) {
671
- switch (_context19.prev = _context19.next) {
672
- case 0:
673
- _context19.next = 2;
674
- return _this6.repository.findOneById(req.params.id);
675
- case 2:
676
- item = _context19.sent;
677
- if (item) {
678
- _context19.next = 5;
679
- break;
680
- }
681
- return _context19.abrupt("return", res.error(_error.NOT_EXISTS));
682
- case 5:
683
- _context19.next = 7;
684
- return item.modifyStatusWaiting(req.user.id);
685
- case 7:
686
- _context19.next = 9;
687
- return _this6.afterModify(item);
688
- case 9:
689
- item = _context19.sent;
690
- return _context19.abrupt("return", res.success(item, _this6.guardResponse, _this6.allowResponse));
691
- case 11:
692
- case "end":
693
- return _context19.stop();
694
- }
634
+ while (1) switch (_context19.prev = _context19.next) {
635
+ case 0:
636
+ _context19.next = 2;
637
+ return _this6.repository.findOneById(req.params.id);
638
+ case 2:
639
+ item = _context19.sent;
640
+ if (item) {
641
+ _context19.next = 5;
642
+ break;
643
+ }
644
+ return _context19.abrupt("return", res.error(_error.NOT_EXISTS));
645
+ case 5:
646
+ _context19.next = 7;
647
+ return item.modifyStatusWaiting(req.user.id);
648
+ case 7:
649
+ _context19.next = 9;
650
+ return _this6.afterModify(item);
651
+ case 9:
652
+ item = _context19.sent;
653
+ return _context19.abrupt("return", res.success(item, _this6.guardResponse, _this6.allowResponse));
654
+ case 11:
655
+ case "end":
656
+ return _context19.stop();
695
657
  }
696
658
  }, _callee19);
697
659
  }));
@@ -706,14 +668,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
706
668
  value: function () {
707
669
  var _afterDelete = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(item) {
708
670
  return _regeneratorRuntime().wrap(function _callee20$(_context20) {
709
- while (1) {
710
- switch (_context20.prev = _context20.next) {
711
- case 0:
712
- return _context20.abrupt("return", item);
713
- case 1:
714
- case "end":
715
- return _context20.stop();
716
- }
671
+ while (1) switch (_context20.prev = _context20.next) {
672
+ case 0:
673
+ return _context20.abrupt("return", item);
674
+ case 1:
675
+ case "end":
676
+ return _context20.stop();
717
677
  }
718
678
  }, _callee20);
719
679
  }));
@@ -745,14 +705,12 @@ var AdminController = /*#__PURE__*/function (_Controller) {
745
705
  value: function () {
746
706
  var _afterDestroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(item) {
747
707
  return _regeneratorRuntime().wrap(function _callee21$(_context21) {
748
- while (1) {
749
- switch (_context21.prev = _context21.next) {
750
- case 0:
751
- return _context21.abrupt("return", item);
752
- case 1:
753
- case "end":
754
- return _context21.stop();
755
- }
708
+ while (1) switch (_context21.prev = _context21.next) {
709
+ case 0:
710
+ return _context21.abrupt("return", item);
711
+ case 1:
712
+ case "end":
713
+ return _context21.stop();
756
714
  }
757
715
  }, _callee21);
758
716
  }));