Beispiel #1
0
        public Task SubmitPreviewGeneration(RecordModel model)
        {
            var previewAction = CreatePreviewAction(model);
            var data          = JObject.FromObject(previewAction);

            return(_component.Create(new JobData
            {
                Id = Guid.NewGuid().ToString(),
                Type = JobType.Actions,
                Data = data
            }));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([FromBody] JobDataDTO data)
        {
            var jobData = new JobData
            {
                Data      = JObject.Parse(data.Data.ToString()),
                Type      = (JobType)Enum.Parse(typeof(JobType), data.Type),
                Id        = data.Id,
                CreatedBy = _user.EmployeeId
            };

            await _component.Create(jobData);

            return(Ok());
        }