Skip to content

Commit d0cd8eb

Browse files
committed
V14: Integrations (Shopify)
- Update PR - Clean up redundant files
1 parent 9e076f5 commit d0cd8eb

File tree

94 files changed

+210
-75248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+210
-75248
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ src/Testsite/App_Plugins/Our.Umbraco.DashIt
66
src/Testsite/umbraco
77
src/Testsite/Views
88
src/Testsite/wwwroot
9-
9+
src/Umbraco.Cms.Integrations.Commerce.Shopify/wwwroot
1010

1111

1212
# User-specific files

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/CheckConfigurationController.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ public CheckConfigurationController(IOptions<ShopifySettings> shopifySettings, I
2929
[ProducesResponseType(typeof(EditorSettings), StatusCodes.Status200OK)]
3030
public IActionResult CheckConfiguration()
3131
{
32-
var settings = !string.IsNullOrEmpty(ShopifySettings.AccessToken)
33-
? new EditorSettings { IsValid = true, Type = ConfigurationType.Api }
34-
: ShopifySettings.UseUmbracoAuthorization
35-
? new EditorSettings { IsValid = true, Type = ConfigurationType.OAuth }
36-
: !string.IsNullOrEmpty(_oauthSettings.ClientId)
37-
&& !string.IsNullOrEmpty(_oauthSettings.Scopes)
38-
&& !string.IsNullOrEmpty(_oauthSettings.ClientSecret)
39-
&& !string.IsNullOrEmpty(_oauthSettings.TokenEndpoint)
40-
? new EditorSettings { IsValid = true, Type = ConfigurationType.OAuth }
41-
: new EditorSettings();
32+
var settings = ShopifyService.GetApiConfiguration();
4233

4334
return Ok(settings);
4435
}

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/GetAccessTokenController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public GetAccessTokenController(IOptions<ShopifySettings> shopifySettings, IShop
2222
{
2323
}
2424

25-
[HttpPost("get-access-token")]
25+
[HttpPost("access-token")]
2626
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
2727
public async Task<IActionResult> GetAccessToken([FromBody]OAuthRequestDto authRequestDto)
2828
{

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/GetAuthorizationUrlController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public GetAuthorizationUrlController(IOptions<ShopifySettings> shopifySettings,
2323
{
2424
}
2525

26-
[HttpGet("get-authorization-url")]
26+
[HttpGet("authorization-url")]
2727
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
28-
public ActionResult GetAuthorizationUrl()
28+
public IActionResult GetAuthorizationUrl()
2929
{
3030
var authUrl = ShopifyAuthorizationService.GetAuthorizationUrl();
3131
return Ok(authUrl);

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/GetListByIdsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public GetListByIdsController(IOptions<ShopifySettings> shopifySettings, IShopif
2222
{
2323
}
2424

25-
[HttpGet("get-list-by-ids")]
25+
[HttpGet("list-by-ids")]
2626
[ProducesResponseType(typeof(ResponseDto<ProductsListDto>), StatusCodes.Status200OK)]
2727
public async Task<IActionResult> GetListByIds([FromBody] RequestDto dto)
2828
{

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/GetListController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ public GetListController(IOptions<ShopifySettings> shopifySettings, IShopifyServ
2222
{
2323
}
2424

25-
[HttpGet("get-list")]
25+
[HttpGet("list/{pageInfo}")]
2626
[ProducesResponseType(typeof(ResponseDto<ProductsListDto>), StatusCodes.Status200OK)]
2727
public async Task<IActionResult> GetList(string? pageInfo)
2828
{
2929
var result = await ShopifyService.GetResults(pageInfo);
30+
result.Skip = 0;
31+
result.Take = 5;
3032
return Ok(result);
3133
}
3234
}

src/Umbraco.Cms.Integrations.Commerce.Shopify/Api/Management/Controllers/RefreshAccessTokenController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public RefreshAccessTokenController(IOptions<ShopifySettings> shopifySettings, I
2323
{
2424
}
2525

26-
[HttpPost("refresh")]
26+
[HttpPost("refresh-access-token")]
2727
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
2828
public async Task<IActionResult> RefreshAccessToken()
2929
{

src/Umbraco.Cms.Integrations.Commerce.Shopify/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/backoffice/icons/icon-shopify.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Umbraco.Cms.Integrations.Commerce.Shopify/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/css/shopify.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Umbraco.Cms.Integrations.Commerce.Shopify/App_Plugins/UmbracoCms.Integrations/Commerce/Shopify/js/productPicker.controller.js

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

0 commit comments

Comments
 (0)