@webresto/graphql 1.3.7 → 1.4.0
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.
- package/.gitattributes +2 -0
- package/.gitlab-ci.yml +18 -0
- package/.vscode/extensions.json +5 -0
- package/docs/actions.md +25 -0
- package/docs/authorization.md +215 -0
- package/docs/captcha.md +71 -0
- package/docs/device-id.md +30 -0
- package/docs/messages.md +10 -0
- package/docs/user.md +54 -0
- package/index.d.ts +0 -1
- package/index.js +6 -2
- package/index.ts +2 -2
- package/lib/afterHook.js +8 -0
- package/lib/afterHook.ts +9 -0
- package/lib/bindTranslations.d.ts +1 -0
- package/lib/bindTranslations.js +40 -0
- package/lib/bindTranslations.ts +39 -0
- package/lib/defaults.d.ts +1 -0
- package/lib/defaults.js +49 -10
- package/lib/defaults.ts +55 -0
- package/lib/eventHelper.d.ts +14 -5
- package/lib/eventHelper.js +28 -9
- package/lib/eventHelper.ts +41 -8
- package/lib/getRecomended.d.ts +1 -0
- package/lib/getRecomended.js +29 -0
- package/lib/getRecomended.ts +31 -0
- package/lib/graphqlHelper.d.ts +3 -4
- package/lib/graphqlHelper.js +184 -72
- package/lib/graphqlHelper.ts +329 -185
- package/lib/jwt.d.ts +10 -0
- package/lib/jwt.js +43 -0
- package/lib/jwt.ts +61 -0
- package/package.json +15 -7
- package/src/additionalResolvers.d.ts +72 -9
- package/src/additionalResolvers.js +93 -24
- package/src/additionalResolvers.ts +105 -34
- package/src/graphql.d.ts +5 -3
- package/src/graphql.js +170 -37
- package/src/graphql.ts +210 -60
- package/src/resolvers/bonusProgram.d.ts +32 -0
- package/src/resolvers/bonusProgram.js +65 -0
- package/src/resolvers/bonusProgram.ts +79 -0
- package/src/resolvers/captcha.d.ts +11 -0
- package/src/resolvers/captcha.js +19 -0
- package/src/resolvers/captcha.ts +16 -0
- package/src/resolvers/checkout.d.ts +35 -16
- package/src/resolvers/checkout.js +171 -94
- package/src/resolvers/checkout.ts +214 -104
- package/src/resolvers/dishAndModifier.js +8 -4
- package/src/resolvers/dishAndModifier.ts +4 -0
- package/src/resolvers/error.d.ts +9 -0
- package/src/resolvers/error.js +21 -0
- package/src/resolvers/error.ts +21 -0
- package/src/resolvers/menu.d.ts +9 -0
- package/src/resolvers/menu.js +12 -0
- package/src/resolvers/menu.ts +10 -0
- package/src/resolvers/order.d.ts +527 -0
- package/src/resolvers/order.js +349 -0
- package/src/resolvers/order.ts +435 -0
- package/src/resolvers/paymentMethod.js +7 -3
- package/src/resolvers/paymentMethod.ts +9 -5
- package/src/resolvers/pickupPoint.d.ts +1 -0
- package/src/resolvers/pickupPoint.js +24 -0
- package/src/resolvers/pickupPoint.ts +23 -0
- package/src/resolvers/recomended.d.ts +13 -0
- package/src/resolvers/recomended.js +80 -0
- package/src/resolvers/recomended.ts +86 -0
- package/src/resolvers/restrictions.d.ts +37 -1
- package/src/resolvers/restrictions.js +100 -15
- package/src/resolvers/restrictions.ts +106 -14
- package/src/resolvers/streets.d.ts +1 -1
- package/src/resolvers/streets.js +1 -4
- package/src/resolvers/streets.ts +1 -3
- package/src/resolvers/subscriptions.d.ts +4 -4
- package/src/resolvers/subscriptions.js +49 -12
- package/src/resolvers/subscriptions.ts +59 -14
- package/src/resolvers/telemetry.d.ts +14 -0
- package/src/resolvers/telemetry.js +25 -0
- package/src/resolvers/telemetry.ts +24 -0
- package/src/resolvers/user.d.ts +82 -0
- package/src/resolvers/user.js +416 -0
- package/src/resolvers/user.ts +621 -0
- package/src/resolvers/userLocation.d.ts +53 -0
- package/src/resolvers/userLocation.js +74 -0
- package/src/resolvers/userLocation.ts +125 -0
- package/src/resolvers/userOTPrequest.d.ts +21 -0
- package/src/resolvers/userOTPrequest.js +57 -0
- package/src/resolvers/userOTPrequest.ts +75 -0
- package/test/e2e_helper.js +157 -0
- package/test/e2e_helper.ts +212 -0
- package/test/fixture/config/i18n.js +7 -20
- package/test/fixture/config/locales/de.json +1 -0
- package/test/fixture/config/locales/en.json +10 -0
- package/test/fixture/config/locales/es.json +3 -0
- package/test/fixture/config/locales/fr.json +1 -0
- package/test/fixture/config/log.js +1 -1
- package/test/fixture/package.json +5 -6
- package/test/fixture/patches/rttc+10.0.1.patch +17 -0
- package/test/integration/captcha.test.js +20 -0
- package/test/integration/captcha.test.ts +25 -0
- package/test/integration/dish.test.js +35 -0
- package/test/integration/dish.test.ts +43 -0
- package/test/integration/graphql.test.js +5 -2
- package/test/integration/graphql.test.ts +2 -4
- package/test/integration/images.test.js +35 -0
- package/test/integration/images.test.ts +40 -0
- package/test/integration/locale.test.js +26 -0
- package/test/integration/locale.test.ts +32 -0
- package/test/integration/order.test.js +56 -43
- package/test/integration/order.test.ts +59 -59
- package/test/integration/subscriptions.test.js +136 -0
- package/test/integration/subscriptions.test.ts +162 -0
- package/test/integration/user.test.js +249 -0
- package/test/integration/user.test.ts +299 -0
- package/test/unit/first.test.js +4 -2
- package/test/unit/first.test.ts +1 -1
- package/test/unit/get-recomended.test.js +56 -0
- package/test/unit/get-recomended.test.ts +63 -0
- package/translations/de.json +2 -0
- package/translations/en.json +3 -0
- package/translations/es.json +3 -0
- package/translations/fr.json +2 -0
- package/translations/ru.json +36 -0
- package/tsconfig.json +20 -5
- package/types/global.d.ts +30 -0
- package/types/global.js +2 -0
- package/types/global.ts +31 -0
- package/types/primitives.d.ts +19 -0
- package/types/references.d.ts +1 -0
- package/types/restoGraphQLConfig.d.ts +13 -0
- package/lib/afterHook.ts___graphql-transport-ws +0 -138
- package/lib/afterHook.ts___graphql-ws +0 -133
- package/lib/errorWrapper.d.ts +0 -4
- package/lib/errorWrapper.js +0 -13
- package/lib/errorWrapper.ts +0 -12
- package/notes.md +0 -1976
- package/src/resolvers/cart.d.ts +0 -343
- package/src/resolvers/cart.js +0 -196
- package/src/resolvers/cart.ts +0 -278
- package/test/fixture/config/connections.js +0 -9
- package/test/integration/sails_not_crash.test.js +0 -3
- package/test/integration/sails_not_crash.test.ts +0 -3
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const eventHelper = require("../../lib/eventHelper");
|
|
4
|
-
const
|
|
4
|
+
const graphqlHelper_1 = require("../../lib/graphqlHelper");
|
|
5
|
+
const jwt_1 = require("../../lib/jwt");
|
|
6
|
+
graphqlHelper_1.default.addType(`#graphql
|
|
7
|
+
input InputOrderCheckout {
|
|
8
|
+
orderId: String!
|
|
9
|
+
paymentMethodId: String!
|
|
10
|
+
customer: Customer!
|
|
11
|
+
spendBonus: InputSpendBonus
|
|
12
|
+
selfService: Boolean
|
|
13
|
+
pickupPointId: String
|
|
14
|
+
locationId: String
|
|
15
|
+
address: Address
|
|
16
|
+
date: String
|
|
17
|
+
comment: String
|
|
18
|
+
personsCount: Int
|
|
19
|
+
customData: Json
|
|
20
|
+
}
|
|
21
|
+
`);
|
|
22
|
+
graphqlHelper_1.default.addType(`#graphql
|
|
23
|
+
input InputSpendBonus {
|
|
24
|
+
bonusProgramId: String!
|
|
25
|
+
amount: Int!
|
|
26
|
+
adapter: String!
|
|
27
|
+
bonusProgramName: String!
|
|
28
|
+
}
|
|
29
|
+
`);
|
|
5
30
|
exports.default = {
|
|
6
31
|
Mutation: {
|
|
7
32
|
checkOrder: {
|
|
8
|
-
def:
|
|
33
|
+
def: `#graphql
|
|
34
|
+
checkOrder(orderCheckout: InputOrderCheckout): CheckResponse`,
|
|
9
35
|
fn: async function (parent, args, context) {
|
|
10
|
-
let data = args;
|
|
36
|
+
let data = args.orderCheckout;
|
|
37
|
+
if (!context.connectionParams.deviceId) {
|
|
38
|
+
throw `Missed deviceId`;
|
|
39
|
+
}
|
|
11
40
|
// if (data.date) {
|
|
12
41
|
// let date = moment(data.date)
|
|
13
42
|
// if(!date.isValid()){
|
|
@@ -17,182 +46,230 @@ exports.default = {
|
|
|
17
46
|
// }
|
|
18
47
|
// }
|
|
19
48
|
let isSelfService;
|
|
20
|
-
|
|
21
|
-
if (data.selfService || data.selfDelivery) {
|
|
22
|
-
isSelfService = true;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
if (!data.address)
|
|
26
|
-
throw `Address is required for non self service orders`;
|
|
27
|
-
}
|
|
49
|
+
let message;
|
|
28
50
|
try {
|
|
29
51
|
var order = await Order.findOne(data.orderId);
|
|
52
|
+
const shouldSendSucessMessage = order.state !== "CHECKOUT";
|
|
30
53
|
if (!order) {
|
|
31
|
-
|
|
54
|
+
message = eventHelper.sendMessage({
|
|
55
|
+
deviceId: context.connectionParams.deviceId,
|
|
32
56
|
type: "error",
|
|
33
|
-
title: "Order not found",
|
|
34
|
-
message:
|
|
57
|
+
title: context.i18n.__("Order not found"),
|
|
58
|
+
message: context.i18n.__("Order with id %s not found", data.orderId),
|
|
35
59
|
});
|
|
36
60
|
}
|
|
61
|
+
//@ts-ignore
|
|
62
|
+
if (data.selfService) {
|
|
63
|
+
isSelfService = true;
|
|
64
|
+
order.pickupPoint = data.pickupPointId;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
order.pickupPoint = null;
|
|
68
|
+
if (!data.address && !data.locationId)
|
|
69
|
+
throw `Address is required for non self service orders`;
|
|
70
|
+
}
|
|
37
71
|
if (order.state === "ORDER") {
|
|
38
|
-
|
|
72
|
+
message = eventHelper.sendMessage({
|
|
73
|
+
deviceId: context.connectionParams.deviceId,
|
|
39
74
|
type: "error",
|
|
40
|
-
title: "
|
|
41
|
-
message: "
|
|
75
|
+
title: context.i18n.__("Error"),
|
|
76
|
+
message: context.i18n.__("Cart was ordered"),
|
|
42
77
|
});
|
|
43
78
|
}
|
|
44
79
|
if (data.paymentMethodId) {
|
|
45
80
|
if (!PaymentMethod.checkAvailable(data.paymentMethodId)) {
|
|
46
|
-
|
|
81
|
+
message = eventHelper.sendMessage({
|
|
82
|
+
deviceId: context.connectionParams.deviceId,
|
|
47
83
|
type: "error",
|
|
48
|
-
title: "
|
|
49
|
-
message: "
|
|
84
|
+
title: context.i18n.__("Error"),
|
|
85
|
+
message: context.i18n.__("Checking the payment system ended in failure"),
|
|
50
86
|
});
|
|
51
87
|
}
|
|
52
88
|
}
|
|
53
|
-
if (data.
|
|
54
|
-
|
|
55
|
-
|
|
89
|
+
if (data.locationId) {
|
|
90
|
+
var address = await UserLocation.findOne({ id: data.locationId });
|
|
91
|
+
if (!address)
|
|
92
|
+
throw `locationId not found`;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
if (data.address) {
|
|
96
|
+
var address = data.address;
|
|
97
|
+
}
|
|
56
98
|
}
|
|
57
|
-
|
|
99
|
+
address = {
|
|
100
|
+
city: address.city || await Settings.use("city"),
|
|
101
|
+
street: address.street,
|
|
102
|
+
...address.streetId && { streetId: address.streetId },
|
|
103
|
+
home: address.home,
|
|
104
|
+
...address.housing && { housing: address.housing },
|
|
105
|
+
...address.apartment && { apartment: address.apartment },
|
|
106
|
+
...address.index && { index: address.index },
|
|
107
|
+
...address.entrance && { entrance: address.entrance },
|
|
108
|
+
...address.floor && { floor: address.floor },
|
|
109
|
+
...address.apartment && { apartment: address.apartment },
|
|
110
|
+
...address.comment && { comment: address.comment },
|
|
111
|
+
};
|
|
112
|
+
order.personsCount = data.personsCount ? data.personsCount + "" : "";
|
|
58
113
|
if (data.comment)
|
|
59
114
|
order.comment = data.comment;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// callback: boolean - перезвонить для уточнения деталей
|
|
115
|
+
order.date = data.date;
|
|
116
|
+
// callback: boolean -call back to clarify details
|
|
63
117
|
if (data.customData && data.customData.callback) {
|
|
64
118
|
if (!order.customData)
|
|
65
119
|
order.customData = {};
|
|
66
120
|
order.customData.callback = data.customData.callback;
|
|
67
121
|
}
|
|
68
122
|
await Order.update({ id: order.id }, order).fetch();
|
|
69
|
-
|
|
123
|
+
let userId = null;
|
|
124
|
+
if (context && context.connectionParams.authorization) {
|
|
125
|
+
userId = (await jwt_1.JWTAuth.verify(context.connectionParams.authorization)).userId;
|
|
126
|
+
}
|
|
127
|
+
await Order.check({ id: order.id }, data.customer, isSelfService, data.address, data.paymentMethodId, userId, data.spendBonus !== undefined && userId !== null ? data.spendBonus : null);
|
|
70
128
|
order = await Order.findOne(data.orderId);
|
|
71
|
-
|
|
72
|
-
if (order.state === "CHECKOUT") {
|
|
129
|
+
if (order.state === "CHECKOUT" && shouldSendSucessMessage) {
|
|
73
130
|
message = {
|
|
131
|
+
deviceId: context.connectionParams.deviceId,
|
|
74
132
|
type: "info",
|
|
75
|
-
title: "
|
|
133
|
+
title: context.i18n.__("Attention"),
|
|
76
134
|
message: order.message
|
|
77
|
-
? order.message
|
|
78
|
-
: "
|
|
135
|
+
? context.i18n.__(order.message)
|
|
136
|
+
: context.i18n.__("Ready for order"),
|
|
79
137
|
};
|
|
80
138
|
}
|
|
81
139
|
else {
|
|
82
140
|
if (order.message) {
|
|
83
141
|
message = {
|
|
142
|
+
deviceId: context.connectionParams.deviceId,
|
|
84
143
|
type: "error",
|
|
85
|
-
title: "
|
|
144
|
+
title: "Attention",
|
|
86
145
|
message: order.message
|
|
87
|
-
? order.message
|
|
88
|
-
: "
|
|
146
|
+
? context.i18n.__(order.message)
|
|
147
|
+
: context.i18n.__("It was not possible to check the order"),
|
|
89
148
|
};
|
|
90
149
|
}
|
|
91
150
|
}
|
|
92
|
-
|
|
93
|
-
|
|
151
|
+
if (message) {
|
|
152
|
+
eventHelper.sendMessage(message);
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
order: order,
|
|
156
|
+
...message && { message: message }
|
|
157
|
+
};
|
|
94
158
|
}
|
|
95
159
|
catch (e) {
|
|
96
160
|
let message = {
|
|
97
161
|
type: "error",
|
|
98
|
-
title: "
|
|
162
|
+
title: context.i18n.__("Error"),
|
|
99
163
|
message: "",
|
|
100
164
|
};
|
|
101
165
|
if (e.code === 1) {
|
|
102
|
-
message.message = "
|
|
166
|
+
message.message = context.i18n.__("Enter the name of the customer");
|
|
103
167
|
}
|
|
104
168
|
else if (e.code === 2) {
|
|
105
|
-
message.message = "
|
|
169
|
+
message.message = context.i18n.__("Enter the customer's phone");
|
|
106
170
|
}
|
|
107
171
|
else if (e.code === 3) {
|
|
108
|
-
message.message = "
|
|
172
|
+
message.message = context.i18n.__("The wrong format of the name of the customer");
|
|
109
173
|
}
|
|
110
174
|
else if (e.code === 4) {
|
|
111
|
-
message.message = "
|
|
175
|
+
message.message = context.i18n.__("The wrong format of the customer number");
|
|
112
176
|
}
|
|
113
177
|
else if (e.code === 5) {
|
|
114
|
-
message.message = "
|
|
178
|
+
message.message = context.i18n.__("No point of Street");
|
|
115
179
|
}
|
|
116
180
|
else if (e.code === 6) {
|
|
117
|
-
message.message = "
|
|
181
|
+
message.message = context.i18n.__("Not indicated the house number");
|
|
118
182
|
}
|
|
119
183
|
else if (e.code === 7) {
|
|
120
|
-
message.message = "
|
|
184
|
+
message.message = context.i18n.__("The city is not indicated");
|
|
121
185
|
}
|
|
122
186
|
else if (e.code === 8) {
|
|
123
|
-
message.message = "
|
|
187
|
+
message.message = context.i18n.__("The payment system is not available");
|
|
188
|
+
}
|
|
189
|
+
else if (e.code === 11) {
|
|
190
|
+
message.message = context.i18n.__(order.delivery.message);
|
|
124
191
|
}
|
|
125
192
|
else if (e.code === 10) {
|
|
126
|
-
message.message = "
|
|
193
|
+
message.message = context.i18n.__("The date of execution of the order is not true");
|
|
194
|
+
}
|
|
195
|
+
else if (e.code === 15) {
|
|
196
|
+
message.message = context.i18n.__("Ordering for a date in the past is not possible");
|
|
127
197
|
}
|
|
128
198
|
else {
|
|
129
199
|
message.message = e.error
|
|
130
200
|
? e.error
|
|
131
|
-
:
|
|
201
|
+
: context.i18n.__(`Problem when checking the order: %s`, e);
|
|
132
202
|
}
|
|
133
|
-
|
|
203
|
+
order = await Order.findOne(data.orderId);
|
|
134
204
|
sails.log.error(e);
|
|
135
|
-
|
|
205
|
+
eventHelper.sendMessage(message);
|
|
206
|
+
return {
|
|
207
|
+
order: order,
|
|
208
|
+
message: message
|
|
209
|
+
};
|
|
136
210
|
}
|
|
137
211
|
},
|
|
138
212
|
},
|
|
139
213
|
sendOrder: {
|
|
140
214
|
def: "sendOrder(orderId: String!): CheckResponse",
|
|
141
215
|
fn: async function (parent, args, context) {
|
|
216
|
+
if (!context.connectionParams.deviceId) {
|
|
217
|
+
throw `Missed deviceId`;
|
|
218
|
+
}
|
|
142
219
|
let data = args;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
220
|
+
var order = await Order.findOne({ id: data.orderId });
|
|
221
|
+
if (!order) {
|
|
222
|
+
const errorMessage = context.i18n.__(`Order with id %s not found`, data.orderId);
|
|
223
|
+
eventHelper.sendMessage({
|
|
224
|
+
deviceId: context.connectionParams.deviceId,
|
|
225
|
+
type: "error",
|
|
226
|
+
title: context.i18n.__("Order not found"),
|
|
227
|
+
message: errorMessage,
|
|
228
|
+
});
|
|
229
|
+
sails.log.error(`${errorMessage}`);
|
|
230
|
+
throw new Error(errorMessage);
|
|
231
|
+
}
|
|
232
|
+
if (!order.isPaymentPromise) {
|
|
233
|
+
try {
|
|
234
|
+
let paymentResponse = await Order.payment({ id: order.id });
|
|
235
|
+
const action = {
|
|
236
|
+
deviceId: context.connectionParams.deviceId,
|
|
237
|
+
type: "Redirect",
|
|
238
|
+
data: {
|
|
239
|
+
link: paymentResponse.redirectLink,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
eventHelper.sendAction(action);
|
|
243
|
+
order = await Order.populate({ id: order.id });
|
|
244
|
+
return { order: order, action: action };
|
|
245
|
+
}
|
|
246
|
+
catch (e) {
|
|
247
|
+
eventHelper.sendMessage({
|
|
248
|
+
deviceId: context.connectionParams.deviceId,
|
|
148
249
|
type: "error",
|
|
149
|
-
title: "
|
|
150
|
-
message:
|
|
250
|
+
title: context.i18n.__("Error"),
|
|
251
|
+
message: context.i18n.__("The payment of the payment has ended unsuccessfully"),
|
|
151
252
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (!(await PaymentMethod.isPaymentPromise(order.paymentMethod))) {
|
|
156
|
-
try {
|
|
157
|
-
let paymentResponse = await Order.payment({ id: order.id });
|
|
158
|
-
const action = {
|
|
159
|
-
type: "PaymentRedirect",
|
|
160
|
-
data: {
|
|
161
|
-
redirectLink: paymentResponse.redirectLink,
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
eventHelper.sendAction(args.orderId, action);
|
|
165
|
-
order = await Order.populate(order.id);
|
|
166
|
-
return { order: order, action: action };
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
eventHelper.sendMessage(args.orderId, {
|
|
170
|
-
type: "error",
|
|
171
|
-
title: "Ошибка",
|
|
172
|
-
message: "Попытка регистрации платежа завершилась неудачно",
|
|
173
|
-
});
|
|
174
|
-
sails.log.error(e);
|
|
175
|
-
throw new errorWrapper_1.Error(JSON.stringify(e));
|
|
176
|
-
}
|
|
253
|
+
const error = `External payment: ${e}`;
|
|
254
|
+
sails.log.error(error);
|
|
255
|
+
throw new Error(error);
|
|
177
256
|
}
|
|
178
|
-
|
|
257
|
+
}
|
|
258
|
+
try {
|
|
259
|
+
await Order.order({ id: order.id });
|
|
179
260
|
order = await Order.findOne({ id: data.orderId });
|
|
180
261
|
const message = {
|
|
181
262
|
type: "info",
|
|
182
|
-
title: "
|
|
183
|
-
message: "
|
|
263
|
+
title: context.i18n.__("Successfully"),
|
|
264
|
+
message: context.i18n.__("Your order is accepted for processing"),
|
|
184
265
|
};
|
|
185
|
-
eventHelper.sendMessage(
|
|
266
|
+
// eventHelper.sendMessage(message);
|
|
186
267
|
return { order: order, message: message };
|
|
187
268
|
}
|
|
188
269
|
catch (e) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
message: e,
|
|
193
|
-
});
|
|
194
|
-
sails.log.error("sendOrder error :", e);
|
|
195
|
-
throw new errorWrapper_1.Error(0, `${e}`);
|
|
270
|
+
const error = `Order finalize error:, ${e}`;
|
|
271
|
+
sails.log.error(error);
|
|
272
|
+
throw new Error(error);
|
|
196
273
|
}
|
|
197
274
|
},
|
|
198
275
|
},
|