Skip to content

Instantly share code, notes, and snippets.

@websterian
Created August 10, 2018 22:03
Show Gist options
  • Save websterian/04141e4f7aaedf819aef5a48c5358218 to your computer and use it in GitHub Desktop.
Save websterian/04141e4f7aaedf819aef5a48c5358218 to your computer and use it in GitHub Desktop.
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