File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/Umbraco.Cms.Integrations.Crm.Hubspot/App_Plugins/UmbracoCms.Integrations/Crm/Hubspot/js Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 4
4
5
5
const oauthName = "OAuth" ;
6
6
7
- vm . oauthSetup = {
8
- authEventHandled : false
9
- } ;
7
+ vm . oauthSetup = { } ;
10
8
vm . status = { } ;
9
+ vm . authEventHandled = false ;
11
10
12
11
$scope . $on ( 'formSubmitting' , function ( ) {
13
12
51
50
vm . onRevokeToken = function ( ) {
52
51
umbracoCmsIntegrationsCrmHubspotResource . revokeAccessToken ( ) . then ( function ( response ) {
53
52
vm . oauthSetup . isConnected = false ;
54
- vm . oauthSetup . authEventHandled = false ;
53
+ vm . authEventHandled = false ;
55
54
56
55
if ( typeof $scope . connected === "undefined" )
57
56
notificationsService . success ( "HubSpot Configuration" , "OAuth connection revoked." ) ;
66
65
67
66
if ( event . data . type === "hubspot:oauth:success" ) {
68
67
69
- if ( vm . oauthSetup . authEventHandled === true ) return ;
68
+ if ( vm . authEventHandled === true ) return ;
70
69
71
70
umbracoCmsIntegrationsCrmHubspotResource . getAccessToken ( event . data . code ) . then ( function ( response ) {
72
71
73
- vm . oauthSetup . authEventHandled = true ;
72
+ vm . authEventHandled = true ;
74
73
75
74
if ( response . startsWith ( "Error:" ) ) {
76
75
if ( typeof $scope . connected === "undefined" )
115
114
}
116
115
117
116
angular . module ( "umbraco" )
118
- . controller ( "Umbraco.Cms.Integrations.Crm.Hubspot.SettingsController" , settingsController ) ;
117
+ . controller ( "Umbraco.Cms.Integrations.Crm.Hubspot.SettingsController" , settingsController ) ;
You can’t perform that action at this time.
0 commit comments