File tree 8 files changed +19
-0
lines changed
8 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,13 @@ import time from '@/utils/time'
9
9
@Service ( )
10
10
export default class CollectionService {
11
11
constructor (
12
+ // @ts -ignore
12
13
@InjectRepository ( CollectionEntity )
13
14
private collectionRepository : Repository < CollectionEntity > ,
15
+ // @ts -ignore
14
16
@InjectRepository ( ConnectionEntity )
15
17
private connectionRepository : Repository < ConnectionEntity > ,
18
+ // @ts -ignore
16
19
@InjectRepository ( WillEntity )
17
20
private willRepository : Repository < WillEntity > ,
18
21
) { }
Original file line number Diff line number Diff line change @@ -18,10 +18,13 @@ export const LessThanDate = (date: string | Date) => LessThan(DateUtils.mixedDat
18
18
@Service ( )
19
19
export default class ConnectionService {
20
20
constructor (
21
+ // @ts -ignore
21
22
@InjectRepository ( ConnectionEntity )
22
23
private connectionRepository : Repository < ConnectionEntity > ,
24
+ // @ts -ignore
23
25
@InjectRepository ( HistoryConnectionEntity )
24
26
private historyConnectionRepository : Repository < HistoryConnectionEntity > ,
27
+ // @ts -ignore
25
28
@InjectRepository ( WillEntity )
26
29
private willRepository : Repository < WillEntity > ,
27
30
) { }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import HistoryMessageHeaderEntity from '../models/HistoryMessageHeaderEntity'
7
7
@Service ( )
8
8
export default class HistoryMessageHeaderService {
9
9
constructor (
10
+ // @ts -ignore
10
11
@InjectRepository ( HistoryMessageHeaderEntity )
11
12
private messageRepository : Repository < HistoryMessageHeaderEntity > ,
12
13
) { }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import HistoryMessagePayloadEntity from '../models/HistoryMessagePayloadEntity'
7
7
@Service ( )
8
8
export default class HistoryMessagePayloadService {
9
9
constructor (
10
+ // @ts -ignore
10
11
@InjectRepository ( HistoryMessagePayloadEntity )
11
12
private messageRepository : Repository < HistoryMessagePayloadEntity > ,
12
13
) { }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Repository } from 'typeorm'
6
6
@Service ( )
7
7
export default class MessageService {
8
8
constructor (
9
+ // @ts -ignore
9
10
@InjectRepository ( MessageEntity )
10
11
private messageRepository : Repository < MessageEntity > ,
11
12
) { }
@@ -63,6 +64,13 @@ export default class MessageService {
63
64
topic = topic . replace ( / [ \\ % _ ] / g, '\\$&' )
64
65
if ( topic . startsWith ( '$share/' ) ) topic = topic . split ( '/' ) . slice ( 2 ) . join ( '/' )
65
66
if ( topic . includes ( '#' ) ) topic = topic . replace ( '/#' , '%' )
67
+ /*
68
+ Known Issue: '+' wildcard handling in MQTT topics is incorrect.
69
+ '+' is replaced with '%' for SQL LIKE, causing multi-level match.
70
+ - Incorrect: 'testtopic/+/test' matches 'testtopic/1/2/test'
71
+ - Incorrect: 'testtopic/+/hello/+' can not matches 'testtopic/hello/hello/hello'
72
+ TODO: FIX this issue.
73
+ */
66
74
if ( topic . includes ( '+' ) ) topic = topic . replace ( '+' , '%' )
67
75
query . andWhere ( 'msg.topic LIKE :topic ESCAPE "\\"' , { topic } )
68
76
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const schemaArray: SchemaType[] = ['protobuf']
8
8
@Service ( )
9
9
export default class ScriptService {
10
10
constructor (
11
+ // @ts -ignore
11
12
@InjectRepository ( ScriptEntity )
12
13
private scriptRepository : Repository < ScriptEntity > ,
13
14
) { }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Repository } from 'typeorm'
6
6
@Service ( )
7
7
export default class SubscriptionService {
8
8
constructor (
9
+ // @ts -ignore
9
10
@InjectRepository ( SubscriptionEntity )
10
11
private subscriptionRepository : Repository < SubscriptionEntity > ,
11
12
) { }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Repository } from 'typeorm'
6
6
@Service ( )
7
7
export default class WillService {
8
8
constructor (
9
+ // @ts -ignore
9
10
@InjectRepository ( WillEntity )
10
11
private willRepository : Repository < WillEntity > ,
11
12
) { }
You can’t perform that action at this time.
0 commit comments