CPE_learningsite
This repository has no backups
This repository's network speed is throttled to 100KB/sec
Upgrade your account to fix these warnings, or use backups.vc for automated backups
4cd176a439ea516368a5d8827cdf8726027259a6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
using Microsoft.AspNet.WebHooks; using Newtonsoft.Json.Linq; using System.Linq; using System.Threading.Tasks; using CPE.App.Api.Helpers; using CPE.App.Web.Models; using CPE.App.Web.Elucidat; using Newtonsoft.Json; using System.Net.Http.Formatting; using Newtonsoft.Json.Serialization; namespace CPE.App.Api.WebHooks { public class ElucidatWebHookHandler : WebHookHandler { public ElucidatWebHookHandler() { this.Receiver = "elucidat"; } public override Task ExecuteAsync(string receiver, WebHookHandlerContext context) { // Get JSON from WebHook JObject data = context.GetDataOrDefault<JObject>(); //TODO data is either project name & project code -> update tin can settings OR release details ->parse description, add to lookup table ReleaseModel release =data.ToObject<ReleaseModel>();//deserialize data into ReleaseModel object; var releaseCode = release.ReleaseCode; var done = ReleaseDetailHelper.GetReleaseDescriptionDetails(release); if (!done) { //send email to cpe that a bad releae was made } // Get the action for this WebHook coming from the action query parameter in the URI string action = context.Actions.FirstOrDefault(); return Task.FromResult(done); } } } |
Commits for CPE_learningsiteCPE/CPE.App/CPE.App.Api/WebHooks/ElucidatWebHookHandler.cs
Revision | Author | Commited | Message |
---|---|---|---|
4cd176 ... | v.shishlov | Fri 27 Aug, 2021 14:33:17 +0000 | initial commit |