Esempio n. 1
0
        public IActionResult Index([FromBody] ResthookResponseDto responseData)
        {
            var filenoteResthookData = new FilenoteResthookResponseData()
            {
                ResthookType = responseData.data.type,
                FilenoteId   = Convert.ToInt32(responseData.data.id),
                Created      = responseData.data.attributes.enteredTimestamp,
                CreatedBy    = responseData.data.attributes.enteredBy,
                Content      = responseData.data.attributes.text
            };

            _appState.FilenoteResthookReceived(filenoteResthookData);

            return(Ok());
        }
Esempio n. 2
0
        private RenderFragment BuildToastMessage(FilenoteResthookResponseData data)
        {
            RenderFragment toastContent;

            toastContent = x =>
            {
                x.OpenElement(0, "div");
                x.AddContent(1, $"Created By: {data.CreatedBy}");
                x.CloseElement();

                x.OpenElement(2, "div");
                x.AddContent(3, $"Created: {data.Created:ddd dd-MMM-yyyy HH:mm}");
                x.CloseElement();

                x.OpenElement(4, "div");
                x.AddContent(5, $"Content: {data.Content}");
                x.CloseElement();
            };

            return(toastContent);
        }
Esempio n. 3
0
 private void OnFilenoteResthookReceived(FilenoteResthookResponseData e)
 {
     _toastService.ShowInfo(BuildToastMessage(e), "New Filenote");
 }