public async Task <ChannelTemplateDetailsDto <TDto> > PostTemplate(string appId, [FromBody] CreateChannelTemplateDto request) { var update = request.ToUpdate <T>(App.Language); var template = await channelTemplateStore.UpsertAsync(appId, null !, update, HttpContext.RequestAborted); return(ChannelTemplateDetailsDto <TDto> .FromDomainObject(template, ToDto)); }
public async Task <ChannelTemplateDetailsDto <TDto> > GetTemplate(string appId, string id) { var template = await channelTemplateStore.GetAsync(appId, id, HttpContext.RequestAborted); if (template == null) { throw new DomainObjectNotFoundException(id); } return(ChannelTemplateDetailsDto <TDto> .FromDomainObject(template, ToDto)); }