Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
namespace Sitecore.Services.Examples.Composer
{
using System;
using System.Threading.Tasks;
using System.Web.Http.OData;
using Microsoft.AspNetCore.Mvc;
using Sitecore.Commerce.Core;
public class CommandsController : CommerceController
{
public CommandsController(IServiceProvider serviceProvider, CommerceEnvironment globalEnvironment)
: base(serviceProvider, globalEnvironment)
{
}
[HttpPut]
[Route("CreateComposerTemplatesCommand()")]
public async Task<IActionResult> CreateComposerTemplatesCommand([FromBody] ODataActionParameters value)
{
var command = this.Command<CreateComposerTemplatesCommand>();
var result = await command.Process(this.CurrentContext, "Placeholder");
return new ObjectResult(command);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.