Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | import ShortUrlVisits from '../ShortUrlVisits'; |
||
6 | const provideServices = (bottle, connect) => { |
||
7 | // Components |
||
8 | bottle.serviceFactory('ShortUrlVisits', ShortUrlVisits, 'VisitsParser'); |
||
9 | bottle.decorator('ShortUrlVisits', connect( |
||
10 | [ 'shortUrlVisits', 'shortUrlDetail' ], |
||
11 | [ 'getShortUrlVisits', 'getShortUrlDetail' ] |
||
12 | )); |
||
13 | |||
14 | // Services |
||
15 | bottle.serviceFactory('VisitsParser', () => visitsParser); |
||
16 | |||
17 | // Actions |
||
18 | bottle.serviceFactory('getShortUrlVisits', getShortUrlVisits, 'buildShlinkApiClient'); |
||
19 | bottle.serviceFactory('getShortUrlDetail', getShortUrlDetail, 'buildShlinkApiClient'); |
||
20 | }; |
||
21 | |||
23 |