Skip to content

Commit

Permalink
VP-1558: Added endpoint to get current theme settings as json (#384)
Browse files Browse the repository at this point in the history
* VP-1558: Added endpoint to get current theme settings as json

* Fix documentation
  • Loading branch information
asvishnyakov authored Mar 2, 2020
1 parent 018d2b4 commit 0b1688b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions VirtoCommerce.Storefront/Controllers/AssetController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using VirtoCommerce.LiquidThemeEngine;
using VirtoCommerce.Storefront.Common;
using VirtoCommerce.Storefront.Extensions;
using VirtoCommerce.Storefront.Infrastructure;
using VirtoCommerce.Storefront.Model;
Expand Down Expand Up @@ -43,6 +44,19 @@ public ActionResult GetThemeLocalizationJson()
return Json(retVal);
}

/// <summary>
/// GET: /themes/settings.json
/// Return settings for current theme
/// </summary>
/// <returns></returns>
[HttpGet("themes/settings.json")]
[ResponseCache(CacheProfileName = "Default")]
public ActionResult GetThemeSettingsJson()
{
var retVal = _themeEngine.GetSettings();
return Json(retVal);
}

/// <summary>
/// GET: /themes/assets/{*path}
/// Handle theme assets requests
Expand Down

0 comments on commit 0b1688b

Please sign in to comment.