Skip to content

Commit cbaf033

Browse files
dbuselRailag
authored andcommitted
Dbusel/bug ewc 301 Flow get list (#302)
* exclude fields on get list * remove useless method
1 parent a8f0f22 commit cbaf033

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/sequelize/managers/flow-manager.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ class FlowManager extends BaseManager {
3636
attributes: ['id']
3737
}, {transaction: transaction})
3838
}
39+
40+
async findAllExcludeFields(where, transaction) {
41+
return Flow.findAll({
42+
where: where,
43+
attributes: {
44+
exclude: [
45+
'created_at',
46+
'updated_at',
47+
'updatedById',
48+
'userId'
49+
]}}, {transaction: transaction})
50+
}
3951
}
4052

4153

src/services/flow-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const _getUserFlows = async function (user, isCLI, transaction) {
116116
userId: user.id
117117
};
118118

119-
return await FlowManager.findAll(flow, transaction)
119+
return await FlowManager.findAllExcludeFields(flow, transaction)
120120
};
121121

122122
const _getAllFlows = async function (isCLI, transaction) {

0 commit comments

Comments
 (0)