Skip to content

Commit c2085ca

Browse files
committed
V14: Integrations (HubSpot/Forms)
- Change Forms to Contact - Remove AppPlugins - Remove Umbraco.Cms.Integrations.OAuthProxy references and controllers - Remove V10&V12 test sites - Some changes to current controllers
1 parent e95aeea commit c2085ca

17 files changed

+14
-544
lines changed

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/AuthorizeController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1212
{
13-
public class AuthorizeController : FormsControllerBase
13+
public class AuthorizeController : ContactControllerBase
1414
{
1515
public AuthorizeController(IContactService contactService) : base(contactService)
1616
{
1717
}
1818

1919
[HttpPost("authorize")]
2020
[ProducesResponseType(typeof(Task<AuthorizationResult>), StatusCodes.Status200OK)]
21-
public IActionResult Authorize([FromBody] AuthorizationRequest request) => Ok(ContactService.AuthorizeAsync(request.Code));
21+
public async Task<IActionResult> Authorize([FromBody] AuthorizationRequest request) => Ok(await ContactService.AuthorizeAsync(request.Code));
2222
}
2323
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/FormsControllerBase.cs renamed to src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/ContactControllerBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1212
{
1313
[ApiVersion("1.0")]
14-
[BackOfficeRoute($"{Constants.ManagementApi.RootPath}/v{{version:apiVersion}}/forms")]
15-
[ApiExplorerSettings(GroupName = Constants.ManagementApi.FormsGroupName)]
16-
public class FormsControllerBase : HubspotControllerBase
14+
[BackOfficeRoute($"{Constants.ManagementApi.RootPath}/v{{version:apiVersion}}/contacts")]
15+
[ApiExplorerSettings(GroupName = Constants.ManagementApi.ContactGroupName)]
16+
public class ContactControllerBase : HubspotControllerBase
1717
{
1818
protected readonly IContactService ContactService;
19-
public FormsControllerBase(IContactService contactService)
19+
public ContactControllerBase(IContactService contactService)
2020
{
2121
ContactService = contactService;
2222
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/DeauthorizeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1212
{
13-
public class DeauthorizeController : FormsControllerBase
13+
public class DeauthorizeController : ContactControllerBase
1414
{
1515
public DeauthorizeController(IContactService contactService) : base(contactService)
1616
{

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/GetAllPropertiesController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1313
{
14-
public class GetAllPropertiesController : FormsControllerBase
14+
public class GetAllPropertiesController : ContactControllerBase
1515
{
1616
public GetAllPropertiesController(IContactService contactService) : base(contactService)
1717
{
1818
}
1919

2020
[HttpGet("properties")]
2121
[ProducesResponseType(typeof(IEnumerable<Property>), StatusCodes.Status200OK)]
22-
public IActionResult GetAll() => Ok(ContactService.GetContactPropertiesAsync());
22+
public async Task<IActionResult> GetAll() => Ok(await ContactService.GetContactPropertiesAsync());
2323
}
2424
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/GetAuthenticationUrlController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1111
{
12-
public class GetAuthenticationUrlController : FormsControllerBase
12+
public class GetAuthenticationUrlController : ContactControllerBase
1313
{
1414
public GetAuthenticationUrlController(IContactService contactService) : base(contactService)
1515
{
1616
}
1717

18-
[HttpGet("auth-url")]
18+
[HttpGet("auth/url")]
1919
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
2020
public string GetAuthenticationUrl() => ContactService.GetAuthenticationUrl();
2121
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/Forms/IsAuthorizationConfiguredController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
namespace Umbraco.Forms.Integrations.Crm.Hubspot.Api.Management.Controllers.Forms
1111
{
12-
public class IsAuthorizationConfiguredController : FormsControllerBase
12+
public class IsAuthorizationConfiguredController : ContactControllerBase
1313
{
1414
public IsAuthorizationConfiguredController(IContactService contactService) : base(contactService)
1515
{
1616
}
1717

18-
[HttpGet("auth-configured")]
18+
[HttpGet("auth/configured")]
1919
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
2020
public IActionResult IsAuthorizationConfigured() => Ok(ContactService.IsAuthorizationConfigured().ToString());
2121
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/OAuthProxy/OAuthProxyControllerBase.cs

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/OAuthProxy/ProxyTokenRequestController.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/Umbraco.Forms.Integrations.Crm.Hubspot/Api/Management/Controllers/ShopifyCompliance/ShopifyComplianceControllerBase.cs

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/Umbraco.Forms.Integrations.Crm.Hubspot/App_Plugins/UmbracoForms.Integrations/Crm/Hubspot/hubspot-field-mapper-template.html

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)