This repository was archived by the owner on Oct 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
service/src/services/dflowzdata Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 142
142
}
143
143
for (let m of jsonXML[type]) {
144
144
// let obj = m
145
-
145
+
146
146
m .type = type .toLowerCase ()
147
147
allProcess .push (m)
148
148
}
222
222
223
223
let actionsObj = {}
224
224
for (let i = 0 ; i < actions .length ; i++ ) {
225
- actionsObj[actions[i]] = this .permissions
225
+ actionsObj[actions[i]. toLowerCase () ] = this .permissions
226
226
}
227
227
subscriptionNew .moduleResource .moduleName = ' workflow_' + this .$route .params .id
228
228
let registerAppModuleNew = actionsObj
Original file line number Diff line number Diff line change @@ -6,11 +6,24 @@ class Service {
6
6
constructor ( options ) {
7
7
this . options = options || { } ;
8
8
this . service = new createServiceMain ( options ) ;
9
- this . rDB = this . service . options . r ( this . service . options . db ) ;
9
+ this . rDB = this . service . options . r . db ( this . service . options . db ) ;
10
10
}
11
11
12
12
setup ( app ) {
13
13
this . app = app ;
14
+ // this.service.watchChangefeeds(app);
15
+ this . on ( 'created' , ( data ) => {
16
+ this . app . io . emit ( this . service . options . name + '_created' , data ) ;
17
+ } ) ;
18
+ this . on ( 'updated' , ( data ) => {
19
+ this . app . io . emit ( this . service . options . name + '_updated' , data ) ;
20
+ } ) ;
21
+ this . on ( 'patched' , ( data ) => {
22
+ this . app . io . emit ( this . service . options . name + '_updated' , data ) ;
23
+ } ) ;
24
+ this . on ( 'removed' , ( data ) => {
25
+ this . app . io . emit ( this . service . options . name + '_removed' , data ) ;
26
+ } ) ;
14
27
}
15
28
setTableName ( params ) {
16
29
this . service . options . name = params . headers . ftablename ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ module.exports = function () {
18
18
19
19
// Get our initialized service so that we can register hooks and filters
20
20
const service = app . service ( 'dflowzdata' ) ;
21
-
21
+ service . watch = false ;
22
22
service . hooks ( hooks ) ;
23
23
// console.log('=======',Object.keys(app.services),'=========');
24
24
} ;
You can’t perform that action at this time.
0 commit comments