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 |
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Threading.Tasks; using Microsoft.AspNet.WebHooks; using Newtonsoft.Json.Linq; using CPE.App.Api.Helpers; using CPE.App.Web.Models; using CPE.App.Web.Elucidat; namespace CPE.App.Api.WebHooks { public class GenericJsonWebHookHandler : WebHookHandler { public GenericJsonWebHookHandler() { this.Receiver = "genericjson"; } public override Task ExecuteAsync(string generator, WebHookHandlerContext context) { // Get JSON from WebHook - elucidat is sendinf multipart/form not json 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) { } // 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/GenericJsonWebHookHandler.cs
Revision | Author | Commited | Message |
---|---|---|---|
4cd176 ... | v.shishlov | Fri 27 Aug, 2021 14:33:17 +0000 | initial commit |