File tree Expand file tree Collapse file tree 1 file changed +22
-29
lines changed Expand file tree Collapse file tree 1 file changed +22
-29
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,20 @@ const Routing = models.Routing;
2626const Registry = models . Registry ;
2727const 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+
2943class 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
You can’t perform that action at this time.
0 commit comments