File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 11import { moduleFactory } from './module' ;
22import FlagsmithFeature from './FlagsmithFeature.vue' ;
33
4- const install = ( Vue , { environmentId, store , host } ) => {
5- const defaultHost = " https://api.flagsmith.com"
4+ const install = ( Vue , { environmentId, store, host } ) => {
5+ const defaultHost = ' https://api.flagsmith.com' ;
66 if ( ! store ) {
77 throw new Error ( 'Please initialize plugin with a Vuex store.' ) ;
88 }
99
1010 Vue . config . applicationHostname = 'localhost' ;
11- store . registerModule (
12- 'flagsmith' ,
13- moduleFactory ( { environmentId, host :host || defaultHost } )
14- ) ;
11+ store . registerModule ( 'flagsmith' , moduleFactory ( { environmentId, host : host || defaultHost } ) ) ;
1512 Vue . component ( 'flagsmith-feature' , FlagsmithFeature ) ;
1613 store . dispatch ( 'flagsmith/fetch' ) ;
1714} ;
Original file line number Diff line number Diff line change @@ -7,14 +7,11 @@ const moduleFactory = ({ host, environmentId }) => ({
77 commit ( 'setLoading' , true ) ;
88
99 try {
10- const { data } = await axios . get (
11- `${ host } /api/v1/flags` ,
12- {
13- headers : {
14- 'X-Environment-Key' : environmentId ,
15- }
10+ const { data } = await axios . get ( `${ host } /api/v1/flags` , {
11+ headers : {
12+ 'X-Environment-Key' : environmentId
1613 }
17- ) ;
14+ } ) ;
1815
1916 commit ( 'setFeatureFlags' , data ) ;
2017 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments