Completed
Pull Request — master (#81)
by Alejandro
03:01
created

provideServices.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 8
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 15
ccs 0
cts 7
cp 0
crap 2
rs 10

1 Function

Rating   Name   Duplication   Size   Complexity  
A provideServices.js ➔ ... ➔ ??? 0 1 1
1
import ShortUrlVisits from '../ShortUrlVisits';
2
import { getShortUrlVisits } from '../reducers/shortUrlVisits';
3
import { getShortUrlDetail } from '../reducers/shortUrlDetail';
4 12
import * as visitsParser from './VisitsParser';
5
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
22
export default provideServices;
23