public IHttpActionResult GetTemplateVersion([FromUri] int templateVersionId) { return(Ok(new GetTemplateVersionResponse { Data = _templateVersionManipulation.GetByVersionId(templateVersionId), Success = Common.Enumerations.ResponseStatus.Succeeded })); }
public GeneratedDocumentDomain ExportTemplate(int templateVersionId, DocumentTypeEnum outputDocType) { TemplateVersionDomain templateVersionDomain = _templateVersionManipulation.GetByVersionId(templateVersionId); if (templateVersionDomain == null) { throw new NsiArgumentNullException(TemplateManagementMessages.TemplateVersionInvalidId); } string name = _templateManipulation.GetTemplateNameById(templateVersionDomain.TemplateId); GeneratedDocumentDomain generatedDocumentDomain = _documentGenerator.Generate(templateVersionDomain.Content, name, DocumentTypeEnum.Json, outputDocType, templateVersionId); return(generatedDocumentDomain); }