示例#1
0
        public async Task <object> Block([FromBody] int templateId)
        {
            EmailTemplate emailTemplate = new EmailTemplate();

            try
            {
                emailTemplate = _templateRepository.Block(templateId);
            }
            catch (Exception ex)
            {
                result = false;
                error  = ex.Message;
            }
            return(new SingleResponse <EmailTemplate>
            {
                Message = "Template blocked successfully",
                DidError = !result,
                ErrorMessage = error,
                Token = string.Empty,
                Model = emailTemplate
            });
        }