ti2 1.0.45 → 1.0.47
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/api.yml
CHANGED
|
@@ -194,6 +194,20 @@ components:
|
|
|
194
194
|
type: array
|
|
195
195
|
items:
|
|
196
196
|
type: string
|
|
197
|
+
desk:
|
|
198
|
+
type: object
|
|
199
|
+
properties:
|
|
200
|
+
id:
|
|
201
|
+
type: string
|
|
202
|
+
name:
|
|
203
|
+
type: string
|
|
204
|
+
agent:
|
|
205
|
+
type: object
|
|
206
|
+
properties:
|
|
207
|
+
id:
|
|
208
|
+
type: string
|
|
209
|
+
name:
|
|
210
|
+
type: string
|
|
197
211
|
bookingSearchQuery:
|
|
198
212
|
type: object
|
|
199
213
|
additionalProperties: true
|
|
@@ -558,7 +572,8 @@ paths:
|
|
|
558
572
|
description: success
|
|
559
573
|
content:
|
|
560
574
|
application/json:
|
|
561
|
-
schema:
|
|
575
|
+
schema:
|
|
576
|
+
$ref: '#/components/schemas/AppTokenList'
|
|
562
577
|
/{app}/{userId}:
|
|
563
578
|
security:
|
|
564
579
|
- bearerAuth: ['app']
|
|
@@ -598,7 +613,8 @@ paths:
|
|
|
598
613
|
description: success
|
|
599
614
|
content:
|
|
600
615
|
application/json:
|
|
601
|
-
schema:
|
|
616
|
+
schema:
|
|
617
|
+
$ref: '#/components/schemas/Message'
|
|
602
618
|
delete:
|
|
603
619
|
tags:
|
|
604
620
|
- app
|
|
@@ -634,7 +650,8 @@ paths:
|
|
|
634
650
|
description: success
|
|
635
651
|
content:
|
|
636
652
|
application/json:
|
|
637
|
-
schema:
|
|
653
|
+
schema:
|
|
654
|
+
$ref: '#/components/schemas/Message'
|
|
638
655
|
/{app}/{userId}/{hint}/token:
|
|
639
656
|
get:
|
|
640
657
|
tags:
|
|
@@ -672,7 +689,8 @@ paths:
|
|
|
672
689
|
description: success
|
|
673
690
|
content:
|
|
674
691
|
application/json:
|
|
675
|
-
schema:
|
|
692
|
+
schema:
|
|
693
|
+
$ref: '#/components/schemas/UserApp'
|
|
676
694
|
/{app}/{userId}/token:
|
|
677
695
|
get:
|
|
678
696
|
tags:
|
|
@@ -703,7 +721,8 @@ paths:
|
|
|
703
721
|
description: success
|
|
704
722
|
content:
|
|
705
723
|
application/json:
|
|
706
|
-
schema:
|
|
724
|
+
schema:
|
|
725
|
+
$ref: '#/components/schemas/UserApp'
|
|
707
726
|
/{app}/{userId}/validate:
|
|
708
727
|
post:
|
|
709
728
|
tags:
|
|
@@ -740,7 +759,8 @@ paths:
|
|
|
740
759
|
description: success
|
|
741
760
|
content:
|
|
742
761
|
application/json:
|
|
743
|
-
schema:
|
|
762
|
+
schema:
|
|
763
|
+
$ref: '#/components/schemas/Message'
|
|
744
764
|
|
|
745
765
|
/{app}/{userId}/jobRun:
|
|
746
766
|
security:
|
|
@@ -779,7 +799,8 @@ paths:
|
|
|
779
799
|
description: success
|
|
780
800
|
content:
|
|
781
801
|
application/json:
|
|
782
|
-
schema:
|
|
802
|
+
schema:
|
|
803
|
+
$ref: '#/components/schemas/JobStatus'
|
|
783
804
|
/{app}/{userId}/{hint}/jobRun:
|
|
784
805
|
security:
|
|
785
806
|
- bearerAuth: ['app', 'user', 'admin']
|
|
@@ -824,7 +845,8 @@ paths:
|
|
|
824
845
|
description: success
|
|
825
846
|
content:
|
|
826
847
|
application/json:
|
|
827
|
-
schema:
|
|
848
|
+
schema:
|
|
849
|
+
$ref: '#/components/schemas/JobStatus'
|
|
828
850
|
/{app}/{userId}/{jobId}/jobStatus:
|
|
829
851
|
security:
|
|
830
852
|
- bearerAuth: ['app', 'user', 'admin']
|
|
@@ -858,11 +880,12 @@ paths:
|
|
|
858
880
|
schema:
|
|
859
881
|
type: string
|
|
860
882
|
responses:
|
|
861
|
-
200:
|
|
883
|
+
'200':
|
|
862
884
|
description: success
|
|
863
885
|
content:
|
|
864
886
|
application/json:
|
|
865
|
-
schema:
|
|
887
|
+
schema:
|
|
888
|
+
$ref: '#/components/schemas/JobStatus'
|
|
866
889
|
/user/{userId}/apps:
|
|
867
890
|
get:
|
|
868
891
|
security:
|
|
@@ -885,7 +908,8 @@ paths:
|
|
|
885
908
|
description: success
|
|
886
909
|
content:
|
|
887
910
|
application/json:
|
|
888
|
-
schema:
|
|
911
|
+
schema:
|
|
912
|
+
$ref: '#/components/schemas/AppTokenList'
|
|
889
913
|
/app/{appKey}/methods:
|
|
890
914
|
get:
|
|
891
915
|
security:
|
|
@@ -907,7 +931,8 @@ paths:
|
|
|
907
931
|
description: the methods available
|
|
908
932
|
content:
|
|
909
933
|
appication/json:
|
|
910
|
-
schema:
|
|
934
|
+
schema:
|
|
935
|
+
$ref: '#/components/schemas/appMethods'
|
|
911
936
|
/settings/{appKey}/{userId}:
|
|
912
937
|
post:
|
|
913
938
|
security:
|
|
@@ -938,12 +963,6 @@ paths:
|
|
|
938
963
|
application/json:
|
|
939
964
|
schema:
|
|
940
965
|
$ref: '#/components/schemas/settingsBody'
|
|
941
|
-
responses:
|
|
942
|
-
200:
|
|
943
|
-
description: success
|
|
944
|
-
content:
|
|
945
|
-
application/json:
|
|
946
|
-
schema: '#/components/schemas/Success'
|
|
947
966
|
get:
|
|
948
967
|
security:
|
|
949
968
|
- bearerAuth: ['admin', 'user']
|
|
@@ -971,7 +990,8 @@ paths:
|
|
|
971
990
|
description: success
|
|
972
991
|
content:
|
|
973
992
|
application/json:
|
|
974
|
-
schema:
|
|
993
|
+
schema:
|
|
994
|
+
$ref: '#/components/schemas/settingsBody'
|
|
975
995
|
delete:
|
|
976
996
|
security:
|
|
977
997
|
- bearerAuth: ['admin', 'user']
|
|
@@ -1000,6 +1020,156 @@ paths:
|
|
|
1000
1020
|
content:
|
|
1001
1021
|
application/json:
|
|
1002
1022
|
$ref: '#/components/schemas/Status'
|
|
1023
|
+
/affiliate/{appKey}/{userId}/desks:
|
|
1024
|
+
get:
|
|
1025
|
+
security:
|
|
1026
|
+
- bearerAuth: ['admin', 'user']
|
|
1027
|
+
tags:
|
|
1028
|
+
- bookings
|
|
1029
|
+
summary: Gets all desks for this affiliate
|
|
1030
|
+
operationId: getAffiliateDesks
|
|
1031
|
+
parameters:
|
|
1032
|
+
- name: appKey
|
|
1033
|
+
in: path
|
|
1034
|
+
description: name of the app to get the desks for (defaults to first token found)
|
|
1035
|
+
required: true
|
|
1036
|
+
example: 'fareharbor'
|
|
1037
|
+
schema:
|
|
1038
|
+
type: string
|
|
1039
|
+
- name: userId
|
|
1040
|
+
in: path
|
|
1041
|
+
description: the user/company that the appKey belongs to
|
|
1042
|
+
required: true
|
|
1043
|
+
schema:
|
|
1044
|
+
type: string
|
|
1045
|
+
responses:
|
|
1046
|
+
'200':
|
|
1047
|
+
description: desks
|
|
1048
|
+
content:
|
|
1049
|
+
application/json:
|
|
1050
|
+
schema:
|
|
1051
|
+
type: object
|
|
1052
|
+
properties:
|
|
1053
|
+
desks:
|
|
1054
|
+
type: array
|
|
1055
|
+
items:
|
|
1056
|
+
$ref: '#/components/schemas/desk'
|
|
1057
|
+
/affiliate/{appKey}/{userId}/{hint}/desks:
|
|
1058
|
+
get:
|
|
1059
|
+
security:
|
|
1060
|
+
- bearerAuth: ['admin', 'user']
|
|
1061
|
+
tags:
|
|
1062
|
+
- bookings
|
|
1063
|
+
summary: Gets all desks for this affiliate
|
|
1064
|
+
operationId: getAffiliateDesks
|
|
1065
|
+
parameters:
|
|
1066
|
+
- name: appKey
|
|
1067
|
+
in: path
|
|
1068
|
+
description: name of the app to get the desks for the token using the hint
|
|
1069
|
+
required: true
|
|
1070
|
+
example: 'fareharbor'
|
|
1071
|
+
schema:
|
|
1072
|
+
type: string
|
|
1073
|
+
- name: userId
|
|
1074
|
+
in: path
|
|
1075
|
+
description: the user/company that the appKey belongs to
|
|
1076
|
+
required: true
|
|
1077
|
+
schema:
|
|
1078
|
+
type: string
|
|
1079
|
+
- name: hint
|
|
1080
|
+
in: path
|
|
1081
|
+
description: a specific token hint to be used
|
|
1082
|
+
required: true
|
|
1083
|
+
example: 'fareharbor-helloworld'
|
|
1084
|
+
schema:
|
|
1085
|
+
type: string
|
|
1086
|
+
responses:
|
|
1087
|
+
'200':
|
|
1088
|
+
description: desks
|
|
1089
|
+
content:
|
|
1090
|
+
application/json:
|
|
1091
|
+
schema:
|
|
1092
|
+
type: object
|
|
1093
|
+
properties:
|
|
1094
|
+
desks:
|
|
1095
|
+
type: array
|
|
1096
|
+
items:
|
|
1097
|
+
$ref: '#/components/schemas/desk'
|
|
1098
|
+
/affiliate/{appKey}/{userId}/agents:
|
|
1099
|
+
get:
|
|
1100
|
+
security:
|
|
1101
|
+
- bearerAuth: ['admin', 'user']
|
|
1102
|
+
tags:
|
|
1103
|
+
- bookings
|
|
1104
|
+
summary: Gets all agents for this affiliate
|
|
1105
|
+
operationId: getAffiliateAgents
|
|
1106
|
+
parameters:
|
|
1107
|
+
- name: appKey
|
|
1108
|
+
in: path
|
|
1109
|
+
description: name of the app to get the agents for (defaults to first token found)
|
|
1110
|
+
required: true
|
|
1111
|
+
example: 'fareharbor'
|
|
1112
|
+
schema:
|
|
1113
|
+
type: string
|
|
1114
|
+
- name: userId
|
|
1115
|
+
in: path
|
|
1116
|
+
description: the user/company that the appKey belongs to
|
|
1117
|
+
required: true
|
|
1118
|
+
schema:
|
|
1119
|
+
type: string
|
|
1120
|
+
responses:
|
|
1121
|
+
'200':
|
|
1122
|
+
description: agents
|
|
1123
|
+
content:
|
|
1124
|
+
application/json:
|
|
1125
|
+
schema:
|
|
1126
|
+
type: object
|
|
1127
|
+
properties:
|
|
1128
|
+
agents:
|
|
1129
|
+
type: array
|
|
1130
|
+
items:
|
|
1131
|
+
$ref: '#/components/schemas/agent'
|
|
1132
|
+
/affiliate/{appKey}/{userId}/{hint}/agents:
|
|
1133
|
+
get:
|
|
1134
|
+
security:
|
|
1135
|
+
- bearerAuth: ['admin', 'user']
|
|
1136
|
+
tags:
|
|
1137
|
+
- bookings
|
|
1138
|
+
summary: Gets all agents for this affiliate
|
|
1139
|
+
operationId: getAffiliateAgents
|
|
1140
|
+
parameters:
|
|
1141
|
+
- name: appKey
|
|
1142
|
+
in: path
|
|
1143
|
+
description: name of the app to get the agents for the token using the hint
|
|
1144
|
+
required: true
|
|
1145
|
+
example: 'fareharbor'
|
|
1146
|
+
schema:
|
|
1147
|
+
type: string
|
|
1148
|
+
- name: userId
|
|
1149
|
+
in: path
|
|
1150
|
+
description: the user/company that the appKey belongs to
|
|
1151
|
+
required: true
|
|
1152
|
+
schema:
|
|
1153
|
+
type: string
|
|
1154
|
+
- name: hint
|
|
1155
|
+
in: path
|
|
1156
|
+
description: a specific token hint to be used
|
|
1157
|
+
required: true
|
|
1158
|
+
example: 'fareharbor-helloworld'
|
|
1159
|
+
schema:
|
|
1160
|
+
type: string
|
|
1161
|
+
responses:
|
|
1162
|
+
'200':
|
|
1163
|
+
description: agents
|
|
1164
|
+
content:
|
|
1165
|
+
application/json:
|
|
1166
|
+
schema:
|
|
1167
|
+
type: object
|
|
1168
|
+
properties:
|
|
1169
|
+
agents:
|
|
1170
|
+
type: array
|
|
1171
|
+
items:
|
|
1172
|
+
$ref: '#/components/schemas/agent'
|
|
1003
1173
|
/bookings/{appKey}/{userId}/search:
|
|
1004
1174
|
post:
|
|
1005
1175
|
security:
|
package/controllers/bookings.js
CHANGED
|
@@ -33,7 +33,7 @@ const bookingsSearch = plugins => async (req, res, next) => {
|
|
|
33
33
|
});
|
|
34
34
|
assert(userAppKeys, 'could not find the app key');
|
|
35
35
|
const token = await userAppKeys.token;
|
|
36
|
-
const search = app.searchHotelBooking || app.searchBooking;
|
|
36
|
+
const search = (app.searchHotelBooking || app.searchBooking).bind(app);
|
|
37
37
|
const results = await search({
|
|
38
38
|
token,
|
|
39
39
|
payload: body,
|
|
@@ -232,6 +232,62 @@ const createBooking = plugins => async (req, res, next) => {
|
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
234
|
|
|
235
|
+
const getAffiliateAgents = plugins => async (req, res, next) => {
|
|
236
|
+
const {
|
|
237
|
+
params: { appKey, userId, hint },
|
|
238
|
+
body: payload,
|
|
239
|
+
} = req;
|
|
240
|
+
try {
|
|
241
|
+
const app = plugins.find(({ name }) => name === appKey);
|
|
242
|
+
// const app = load(appKey);
|
|
243
|
+
const userAppKeys = (await UserAppKey.findOne({
|
|
244
|
+
where: {
|
|
245
|
+
userId,
|
|
246
|
+
integrationId: appKey,
|
|
247
|
+
...(hint ? { hint } : {}),
|
|
248
|
+
},
|
|
249
|
+
}));
|
|
250
|
+
assert(userAppKeys, 'could not find the app key');
|
|
251
|
+
const token = await userAppKeys.token;
|
|
252
|
+
assert(app.getAffiliateAgents, `getAffiliateAgents is not available for ${appKey}`);
|
|
253
|
+
const results = await app.getAffiliateAgents({
|
|
254
|
+
token,
|
|
255
|
+
payload,
|
|
256
|
+
});
|
|
257
|
+
return res.json(results);
|
|
258
|
+
} catch (err) {
|
|
259
|
+
return next(err);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const getAffiliateDesks = plugins => async (req, res, next) => {
|
|
264
|
+
const {
|
|
265
|
+
params: { appKey, userId, hint },
|
|
266
|
+
body: payload,
|
|
267
|
+
} = req;
|
|
268
|
+
try {
|
|
269
|
+
const app = plugins.find(({ name }) => name === appKey);
|
|
270
|
+
// const app = load(appKey);
|
|
271
|
+
const userAppKeys = (await UserAppKey.findOne({
|
|
272
|
+
where: {
|
|
273
|
+
userId,
|
|
274
|
+
integrationId: appKey,
|
|
275
|
+
...(hint ? { hint } : {}),
|
|
276
|
+
},
|
|
277
|
+
}));
|
|
278
|
+
assert(userAppKeys, 'could not find the app key');
|
|
279
|
+
const token = await userAppKeys.token;
|
|
280
|
+
assert(app.getAffiliateDesks, `getAffiliateDesks is not available for ${appKey}`);
|
|
281
|
+
const results = await app.getAffiliateDesks({
|
|
282
|
+
token,
|
|
283
|
+
payload,
|
|
284
|
+
});
|
|
285
|
+
return res.json(results);
|
|
286
|
+
} catch (err) {
|
|
287
|
+
return next(err);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
235
291
|
module.exports = plugins => ({
|
|
236
292
|
bookingsSearch: bookingsSearch(plugins),
|
|
237
293
|
bookingsCancel: bookingsCancel(plugins),
|
|
@@ -242,4 +298,6 @@ module.exports = plugins => ({
|
|
|
242
298
|
bookingsAvailabilityCalendar: bookingsAvailabilityCalendar(plugins),
|
|
243
299
|
searchQuote: searchQuote(plugins),
|
|
244
300
|
createBooking: createBooking(plugins),
|
|
301
|
+
getAffiliateAgents: getAffiliateAgents(plugins),
|
|
302
|
+
getAffiliateDesks: getAffiliateDesks(plugins),
|
|
245
303
|
});
|
|
@@ -15,8 +15,22 @@ const typeDefs = `
|
|
|
15
15
|
title: String
|
|
16
16
|
description: String
|
|
17
17
|
}
|
|
18
|
+
type PickupPoint {
|
|
19
|
+
id: ID
|
|
20
|
+
name: String
|
|
21
|
+
pickupAvail: Boolean
|
|
22
|
+
directions: String
|
|
23
|
+
latitude: Float
|
|
24
|
+
longitude: Float
|
|
25
|
+
street: String
|
|
26
|
+
postal: String
|
|
27
|
+
city: String
|
|
28
|
+
state: String
|
|
29
|
+
country: String
|
|
30
|
+
localDateTime: String
|
|
31
|
+
}
|
|
18
32
|
type Query {
|
|
19
|
-
key(productId:
|
|
33
|
+
key(productId: ID, optionId: ID, currency: String, unitsWithQuantity: [UnitWithQuantity], jwtKey: String): String
|
|
20
34
|
dateTimeStart: String
|
|
21
35
|
dateTimeEnd: String
|
|
22
36
|
allDay: Boolean
|
|
@@ -25,16 +39,35 @@ const typeDefs = `
|
|
|
25
39
|
pricing: Pricing
|
|
26
40
|
unitPricing: [Pricing]
|
|
27
41
|
offer: Offer
|
|
42
|
+
pickupAvailable: Boolean
|
|
43
|
+
pickupRequired: Boolean
|
|
44
|
+
pickupPoints: [PickupPoint]
|
|
28
45
|
}
|
|
29
46
|
`;
|
|
30
47
|
|
|
31
|
-
const query = `query getAvailability ($
|
|
32
|
-
key (productId: $
|
|
48
|
+
const query = `query getAvailability ($productId: ID, $optionId: ID, $currency: String, $unitsWithQuantity: [UnitWithQuantity], $jwtKey: String) {
|
|
49
|
+
key (productId: $productId, optionId: $optionId, currency: $currency, unitsWithQuantity: $unitsWithQuantity, jwtKey: $jwtKey)
|
|
33
50
|
dateTimeStart
|
|
34
51
|
dateTimeEnd
|
|
35
52
|
allDay
|
|
36
53
|
vacancies
|
|
37
54
|
available
|
|
55
|
+
pickupAvailable
|
|
56
|
+
pickupRequired
|
|
57
|
+
pickupPoints {
|
|
58
|
+
id
|
|
59
|
+
name
|
|
60
|
+
pickupAvail
|
|
61
|
+
directions
|
|
62
|
+
latitude
|
|
63
|
+
longitude
|
|
64
|
+
street
|
|
65
|
+
postal
|
|
66
|
+
city
|
|
67
|
+
state
|
|
68
|
+
country
|
|
69
|
+
localDateTime
|
|
70
|
+
}
|
|
38
71
|
pricing {
|
|
39
72
|
...pricingFields
|
|
40
73
|
}
|
|
@@ -18,6 +18,27 @@ const typeDefs = `
|
|
|
18
18
|
currencyPrecision: Int
|
|
19
19
|
currency: String
|
|
20
20
|
}
|
|
21
|
+
type Agent {
|
|
22
|
+
id: Int
|
|
23
|
+
name: String
|
|
24
|
+
}
|
|
25
|
+
type Desk {
|
|
26
|
+
id: Int
|
|
27
|
+
name: String
|
|
28
|
+
}
|
|
29
|
+
type PickupPoint {
|
|
30
|
+
id: ID
|
|
31
|
+
name: String
|
|
32
|
+
directions: String
|
|
33
|
+
latitude: Float
|
|
34
|
+
longitude: Float
|
|
35
|
+
street: String
|
|
36
|
+
postal: String
|
|
37
|
+
city: String
|
|
38
|
+
state: String
|
|
39
|
+
country: String
|
|
40
|
+
localDateTime: String
|
|
41
|
+
}
|
|
21
42
|
type Query {
|
|
22
43
|
id: ID
|
|
23
44
|
orderId: ID
|
|
@@ -42,6 +63,13 @@ const typeDefs = `
|
|
|
42
63
|
resellerReference: String
|
|
43
64
|
publicUrl: String
|
|
44
65
|
privateUrl: String
|
|
66
|
+
agent: Agent
|
|
67
|
+
desk: Desk
|
|
68
|
+
pickupRequested: Boolean
|
|
69
|
+
pickupPointId: ID
|
|
70
|
+
pickupHotel: String
|
|
71
|
+
pickupHotelRoom: String
|
|
72
|
+
pickupPoint: PickupPoint
|
|
45
73
|
}
|
|
46
74
|
`;
|
|
47
75
|
|
|
@@ -86,6 +114,31 @@ const query = `{
|
|
|
86
114
|
resellerReference
|
|
87
115
|
publicUrl
|
|
88
116
|
privateUrl
|
|
117
|
+
agent {
|
|
118
|
+
id
|
|
119
|
+
name
|
|
120
|
+
}
|
|
121
|
+
desk {
|
|
122
|
+
id
|
|
123
|
+
name
|
|
124
|
+
}
|
|
125
|
+
pickupRequested
|
|
126
|
+
pickupPointId
|
|
127
|
+
pickupHotel
|
|
128
|
+
pickupHotelRoom
|
|
129
|
+
pickupPoint {
|
|
130
|
+
id
|
|
131
|
+
name
|
|
132
|
+
directions
|
|
133
|
+
latitude
|
|
134
|
+
longitude
|
|
135
|
+
street
|
|
136
|
+
postal
|
|
137
|
+
city
|
|
138
|
+
state
|
|
139
|
+
country
|
|
140
|
+
localDateTime
|
|
141
|
+
}
|
|
89
142
|
}`;
|
|
90
143
|
|
|
91
144
|
module.exports = {
|
|
@@ -7,13 +7,13 @@ const typeDefs = `
|
|
|
7
7
|
type Pricing {
|
|
8
8
|
original: Int
|
|
9
9
|
retail: Int
|
|
10
|
-
currency:
|
|
10
|
+
currency: String
|
|
11
11
|
currencyPrecision: Int
|
|
12
12
|
}
|
|
13
13
|
type Unit {
|
|
14
14
|
unitId: ID
|
|
15
15
|
unitName: String
|
|
16
|
-
subtitle: String
|
|
16
|
+
subtitle: String
|
|
17
17
|
restrictions: Restriction
|
|
18
18
|
type: String
|
|
19
19
|
pricing: [Pricing]
|
package/index.js
CHANGED
|
@@ -241,7 +241,7 @@ module.exports = async ({
|
|
|
241
241
|
return next(err);
|
|
242
242
|
}
|
|
243
243
|
if (process.env.CONSOLE_ERRORS || process.env.JEST_WORKER_ID) {
|
|
244
|
-
console.error(R.path(['response', 'data'], err), err
|
|
244
|
+
console.error(R.path(['response', 'data'], err), err);
|
|
245
245
|
}
|
|
246
246
|
return res.status((() => {
|
|
247
247
|
if (!isNumber(err.status)) return 500;
|