Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit cb1458c

Browse files
#12 - Fix issue where payloads would not be validated. Also, support inactive users
1 parent fd2daf9 commit cb1458c

File tree

9 files changed

+224
-156
lines changed

9 files changed

+224
-156
lines changed

scripts/db/data/ExternalProfile.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"updated": "2020-05-13T06:46:15.893Z",
66
"createdBy": "tc-Admin",
77
"updatedBy": "tc-Admin",
8+
"isInactive": false,
89
"userId": "ce348067-e73f-49d7-af72-fcf11a6c88bf",
910
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
1011
"externalId": "1234567",
@@ -16,6 +17,7 @@
1617
"updated": "2020-05-13T06:46:15.893Z",
1718
"createdBy": "tc-Admin",
1819
"updatedBy": "tc-Admin",
20+
"isInactive": false,
1921
"userId": "3f64739e-10bf-42ca-8314-8aea0245cd0f",
2022
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
2123
"externalId": "8547899",
@@ -27,6 +29,19 @@
2729
"updated": "2020-05-13T06:46:15.893Z",
2830
"createdBy": "tc-Admin",
2931
"updatedBy": "tc-Admin",
32+
"isInactive": false,
33+
"userId": "3f64739e-10bf-42ca-8314-8aea0245cd0f",
34+
"organizationId": "6a21394e-1278-4835-9e4d-cb4ff151fcd3",
35+
"externalId": "23124329",
36+
"uri": "http://www.new.com/new-uri"
37+
},
38+
{
39+
"id": "f2d1b567-8ea3-4eec-93b0-32378a19edb7",
40+
"created": "2020-05-13T06:11:21.361Z",
41+
"updated": "2020-05-13T06:46:15.893Z",
42+
"createdBy": "tc-Admin",
43+
"updatedBy": "tc-Admin",
44+
"isInactive": false,
3045
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699",
3146
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
3247
"externalId": "23225544",
@@ -38,6 +53,7 @@
3853
"updated": "2020-05-13T06:46:15.893Z",
3954
"createdBy": "tc-Admin",
4055
"updatedBy": "tc-Admin",
56+
"isInactive": false,
4157
"userId": "ecec4ad8-3a1d-4646-8641-25054e8f2d33",
4258
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
4359
"externalId": "2838084",
@@ -49,6 +65,7 @@
4965
"updated": "2020-05-13T06:46:15.893Z",
5066
"createdBy": "tc-Admin",
5167
"updatedBy": "tc-Admin",
68+
"isInactive": false,
5269
"userId": "7d93ee11-b4e9-415e-9a6f-aff458d6f975",
5370
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
5471
"externalId": "8637137",
@@ -60,6 +77,7 @@
6077
"updated": "2020-05-13T06:46:15.893Z",
6178
"createdBy": "tc-Admin",
6279
"updatedBy": "tc-Admin",
80+
"isInactive": false,
6381
"userId": "df2f0027-f74f-45fa-85cd-84c9fdc2faf4",
6482
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
6583
"externalId": "7724780",
@@ -71,6 +89,7 @@
7189
"updated": "2020-05-13T06:46:15.893Z",
7290
"createdBy": "tc-Admin",
7391
"updatedBy": "tc-Admin",
92+
"isInactive": false,
7493
"userId": "e043286d-ab55-44e3-b2c2-7f7a4f375dcf",
7594
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
7695
"externalId": "3180776",
@@ -82,6 +101,7 @@
82101
"updated": "2020-05-13T06:46:15.893Z",
83102
"createdBy": "tc-Admin",
84103
"updatedBy": "tc-Admin",
104+
"isInactive": false,
85105
"userId": "0f8e52c1-33fd-48f2-b160-415c2bb371f2",
86106
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
87107
"externalId": "8944692",
@@ -93,6 +113,7 @@
93113
"updated": "2020-05-13T06:46:15.893Z",
94114
"createdBy": "tc-Admin",
95115
"updatedBy": "tc-Admin",
116+
"isInactive": false,
96117
"userId": "06f130d0-0764-4894-bcd8-67e2758b15d9",
97118
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
98119
"externalId": "8450763",
@@ -104,6 +125,7 @@
104125
"updated": "2020-05-13T06:46:15.893Z",
105126
"createdBy": "tc-Admin",
106127
"updatedBy": "tc-Admin",
128+
"isInactive": false,
107129
"userId": "e02d66c9-01d6-4cd8-9f8c-30e40315adcc",
108130
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
109131
"externalId": "8712185",
@@ -115,6 +137,7 @@
115137
"updated": "2020-05-13T06:46:15.893Z",
116138
"createdBy": "tc-Admin",
117139
"updatedBy": "tc-Admin",
140+
"isInactive": false,
118141
"userId": "35ec01c0-d650-4cd9-8a05-848c9019873d",
119142
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
120143
"externalId": "5876965",
@@ -126,6 +149,7 @@
126149
"updated": "2020-05-13T06:46:15.893Z",
127150
"createdBy": "tc-Admin",
128151
"updatedBy": "tc-Admin",
152+
"isInactive": false,
129153
"userId": "4f2dc463-e24b-4b4a-8cde-c0122fbfb8ac",
130154
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
131155
"externalId": "2154615",
@@ -137,6 +161,7 @@
137161
"updated": "2020-05-13T06:46:15.893Z",
138162
"createdBy": "tc-Admin",
139163
"updatedBy": "tc-Admin",
164+
"isInactive": false,
140165
"userId": "28df7acf-d7b1-467c-8ee5-594c7bace8dc",
141166
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
142167
"externalId": "8591690",
@@ -148,6 +173,7 @@
148173
"updated": "2020-05-13T06:46:15.893Z",
149174
"createdBy": "tc-Admin",
150175
"updatedBy": "tc-Admin",
176+
"isInactive": false,
151177
"userId": "ef2498f9-7046-4fad-ad85-fc5e4675e693",
152178
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
153179
"externalId": "1262746",
@@ -159,6 +185,7 @@
159185
"updated": "2020-05-13T06:46:15.893Z",
160186
"createdBy": "tc-Admin",
161187
"updatedBy": "tc-Admin",
188+
"isInactive": false,
162189
"userId": "f0df47fc-2b1f-44ad-bd38-1ada036ba4d9",
163190
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
164191
"externalId": "5638359",
@@ -170,6 +197,7 @@
170197
"updated": "2020-05-13T06:46:15.893Z",
171198
"createdBy": "tc-Admin",
172199
"updatedBy": "tc-Admin",
200+
"isInactive": false,
173201
"userId": "3f8d1ed0-531a-4695-bfc9-f7beda034a66",
174202
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
175203
"externalId": "2390800",
@@ -181,6 +209,7 @@
181209
"updated": "2020-05-13T06:46:15.893Z",
182210
"createdBy": "tc-Admin",
183211
"updatedBy": "tc-Admin",
212+
"isInactive": false,
184213
"userId": "05301625-4a45-4cf9-b93c-cd6b55ed9f74",
185214
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
186215
"externalId": "1588616",
@@ -192,6 +221,7 @@
192221
"updated": "2020-05-13T06:46:15.893Z",
193222
"createdBy": "tc-Admin",
194223
"updatedBy": "tc-Admin",
224+
"isInactive": false,
195225
"userId": "460bddcd-3580-4f2a-bfe8-5ba6d8f6f6af",
196226
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
197227
"externalId": "8855875",
@@ -203,6 +233,7 @@
203233
"updated": "2020-05-13T06:46:15.893Z",
204234
"createdBy": "tc-Admin",
205235
"updatedBy": "tc-Admin",
236+
"isInactive": false,
206237
"userId": "cdaeb417-e400-4df1-b484-f99ae10b4800",
207238
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
208239
"externalId": "3847475",
@@ -214,6 +245,7 @@
214245
"updated": "2020-05-13T06:46:15.893Z",
215246
"createdBy": "tc-Admin",
216247
"updatedBy": "tc-Admin",
248+
"isInactive": false,
217249
"userId": "e283eb2e-bfb7-43a6-a06d-ed89af338a4f",
218250
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
219251
"externalId": "1546137",
@@ -225,6 +257,7 @@
225257
"updated": "2020-05-13T06:46:15.893Z",
226258
"createdBy": "tc-Admin",
227259
"updatedBy": "tc-Admin",
260+
"isInactive": false,
228261
"userId": "6fa6d708-68a6-47be-9591-4b5100921b3a",
229262
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
230263
"externalId": "7772959",
@@ -236,6 +269,7 @@
236269
"updated": "2020-05-13T06:46:15.893Z",
237270
"createdBy": "tc-Admin",
238271
"updatedBy": "tc-Admin",
272+
"isInactive": false,
239273
"userId": "f8bf2ba2-0e21-47c7-9410-4596b61c6403",
240274
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
241275
"externalId": "7076592",
@@ -247,6 +281,7 @@
247281
"updated": "2020-05-13T06:46:15.893Z",
248282
"createdBy": "tc-Admin",
249283
"updatedBy": "tc-Admin",
284+
"isInactive": false,
250285
"userId": "5bd69a82-c2cb-476f-9462-0883d3b28b90",
251286
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
252287
"externalId": "9358202",
@@ -258,6 +293,7 @@
258293
"updated": "2020-05-13T06:46:15.893Z",
259294
"createdBy": "tc-Admin",
260295
"updatedBy": "tc-Admin",
296+
"isInactive": false,
261297
"userId": "428a5d57-558c-4387-bada-6c966eb3b4bd",
262298
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
263299
"externalId": "9338436",
@@ -269,6 +305,7 @@
269305
"updated": "2020-05-13T06:46:15.893Z",
270306
"createdBy": "tc-Admin",
271307
"updatedBy": "tc-Admin",
308+
"isInactive": false,
272309
"userId": "6910d2f4-a50a-4494-8f46-6de1f3d032c2",
273310
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
274311
"externalId": "5935690",
@@ -280,6 +317,7 @@
280317
"updated": "2020-05-13T06:46:15.893Z",
281318
"createdBy": "tc-Admin",
282319
"updatedBy": "tc-Admin",
320+
"isInactive": false,
283321
"userId": "7e3f962a-378a-4f18-9cc7-ffbcff7f9b35",
284322
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
285323
"externalId": "1944756",
@@ -291,6 +329,7 @@
291329
"updated": "2020-05-13T06:46:15.893Z",
292330
"createdBy": "tc-Admin",
293331
"updatedBy": "tc-Admin",
332+
"isInactive": false,
294333
"userId": "60166f39-6652-4366-a1b7-7eeb72860637",
295334
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
296335
"externalId": "7219520",
@@ -302,6 +341,7 @@
302341
"updated": "2020-05-13T06:46:15.893Z",
303342
"createdBy": "tc-Admin",
304343
"updatedBy": "tc-Admin",
344+
"isInactive": false,
305345
"userId": "bdcb113f-6715-40fd-8dab-14aa01327ae9",
306346
"organizationId": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
307347
"externalId": "8819322",

scripts/db/data/Organization.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@
66
"createdBy": "tc-Copilot",
77
"updatedBy": "tc-Copilot",
88
"name": "Topcoder"
9+
},
10+
{
11+
"id": "6a21394e-1278-4835-9e4d-cb4ff151fcd3",
12+
"created": "2020-05-05T11:01:31.334Z",
13+
"updated": "2020-05-05T11:02:10.574Z",
14+
"createdBy": "tc-Copilot",
15+
"updatedBy": "tc-Copilot",
16+
"name": "Cool Party"
917
}
1018
]

scripts/db/data/UserAttribute.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"userId": "ce348067-e73f-49d7-af72-fcf11a6c88bf"
8181
},
8282
{
83-
"id": "20721207-c868-4ee4-8ac4-59db683b7bce",
83+
"id": "f15010ef-76fd-4a70-aa7c-a53200300300",
8484
"created": "2020-05-13T08:48:30.541Z",
8585
"updated": null,
8686
"createdBy": "tc-user",
@@ -90,7 +90,7 @@
9090
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
9191
},
9292
{
93-
"id": "efcbd4a7-4e1c-4109-8fac-50a1d6d5b7df",
93+
"id": "208386ea-b3d7-4add-ab6c-6460b0ae7fab",
9494
"created": "2020-05-13T08:19:13.709Z",
9595
"updated": null,
9696
"createdBy": "tc-Admin",
@@ -100,7 +100,7 @@
100100
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
101101
},
102102
{
103-
"id": "cd28194f-c3a9-4445-bef0-ea411996cc93",
103+
"id": "edb933cc-e2fb-4112-a2fc-6809af7733c5",
104104
"created": "2020-05-13T08:19:13.709Z",
105105
"updated": null,
106106
"createdBy": "tc-Admin",
@@ -120,7 +120,7 @@
120120
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
121121
},
122122
{
123-
"id": "90fef208-619d-49c6-890e-c789664b28d7",
123+
"id": "21de9324-900d-41ea-b127-f297dfb9a873",
124124
"created": "2020-05-13T08:19:13.709Z",
125125
"updated": null,
126126
"createdBy": "tc-Admin",
@@ -130,7 +130,7 @@
130130
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
131131
},
132132
{
133-
"id": "8a174a2b-cda3-463d-b3ef-41367d983258",
133+
"id": "b93ebc48-8d24-4ea9-8d4b-08fd00b20901",
134134
"created": "2020-05-13T08:19:13.709Z",
135135
"updated": null,
136136
"createdBy": "tc-Admin",
@@ -140,7 +140,7 @@
140140
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
141141
},
142142
{
143-
"id": "17ff7dcb-8751-4fe1-bb3c-c2b00b447d3c",
143+
"id": "cfd55fff-4b21-48ce-bcc6-fd031f20ebe5",
144144
"created": "2020-05-13T08:19:13.709Z",
145145
"updated": null,
146146
"createdBy": "tc-Admin",
@@ -150,7 +150,7 @@
150150
"userId": "0bcb0d86-09bb-410a-b2b1-fba90d1a7699"
151151
},
152152
{
153-
"id": "15e7bcf1-aac7-4718-ac11-6f2b94be3d33",
153+
"id": "86b5945d-287b-462a-9a47-4e506f03f2e6",
154154
"created": "2020-05-13T08:19:13.709Z",
155155
"updated": null,
156156
"createdBy": "tc-Admin",

src/bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function buildServices (dir) {
2020
} else if (file.toLowerCase().indexOf('service.js') >= 0) {
2121
let serviceName = curPath.split('modules')[1]
2222
serviceName = serviceName.substr(1, serviceName.length - 4)
23-
logger.info(`add decorates for service --> ${serviceName}`)
24-
logger.buildService(serviceName, require(curPath)); // eslint-disable-line
23+
logger.info(`add decorators for service --> ${serviceName}`)
24+
logger.buildService(serviceName, require(curPath)); // eslint-disable-line
2525
}
2626
})
2727
}

0 commit comments

Comments
 (0)