Skip to content

Commit 858e29f

Browse files
mchepelevRailag
authored andcommitted
EWC-370 missing fields was restored in microservice list response (#392)
* EWC-370 missing fields was restored in microservice list response * EWC-370 missing fields was restored in microservice list response
1 parent 65b375c commit 858e29f

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

src/sequelize/managers/microservice-manager.js

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ const Routing = models.Routing;
2626
const Registry = models.Registry;
2727
const MicroserviceStatus = models.MicroserviceStatus;
2828

29+
const microserviceExcludedFields = [
30+
'configLastUpdated',
31+
'created_at',
32+
'updated_at',
33+
'updatedBy',
34+
'registryId',
35+
'isNetwork',
36+
'rebuild',
37+
'deleteWithCleanUp',
38+
'imageSnapshot',
39+
'catalog_item_id',
40+
'iofog_uuid'
41+
];
42+
2943
class MicroserviceManager extends BaseManager {
3044
getEntity() {
3145
return Microservice
@@ -247,41 +261,20 @@ class MicroserviceManager extends BaseManager {
247261
return Microservice.findOne({
248262
where: where,
249263
attributes: {
250-
exclude: [
251-
'configLastUpdated',
252-
'created_at',
253-
'updated_at',
254-
'updatedBy',
255-
'registryId',
256-
'isNetwork',
257-
'rebuild',
258-
'deleteWithCleanUp',
259-
'imageSnapshot',
260-
'catalog_item_id',
261-
'iofog_uuid'
262-
]}}, {transaction: transaction})
264+
exclude: microserviceExcludedFields
265+
}}, {
266+
transaction: transaction
267+
});
263268
}
264269

265270
async findAllExcludeFields(where, transaction) {
266271
return Microservice.findAll({
267272
where: where,
268273
attributes: {
269-
exclude: [
270-
'configLastUpdated',
271-
'created_at',
272-
'updated_at',
273-
'updatedBy',
274-
'flowId',
275-
'registryId',
276-
'isNetwork',
277-
'rebuild',
278-
'deleteWithCleanUp',
279-
'imageSnapshot',
280-
'catalog_item_id',
281-
'iofog_uuid',
282-
'iofogUuid',
283-
'catalogItemId'
284-
]}}, {transaction: transaction})
274+
exclude: microserviceExcludedFields
275+
}}, {
276+
transaction: transaction
277+
});
285278
}
286279
}
287280

0 commit comments

Comments
 (0)