Esempio n. 1
0
        private dynamic LastCompleted(dynamic o)
        {
            var completedRequest = this.Bind <PublishLastCompletedRequest>();

            var parameters = new PublishLastCompleted
            {
                Source   = completedRequest.Source ?? "master",
                Target   = completedRequest.Target ?? "web",
                Language = completedRequest.Language ?? "en"
            };

            var date = _publishService.GetLastCompletedRun(parameters);

            return(Response.AsJson(date));
        }
Esempio n. 2
0
        public override void HandleRequest(HttpContextBase context)
        {
            if (CanHandle(context))
            {
                var completedRequest = GetRequest(context.Request);

                var date = _publishService.GetLastCompletedRun(completedRequest);

                var json = Json.Encode(new { date });
                JsonResponse(json, HttpStatusCode.Accepted, context);
            }
            else if (Successor != null)
            {
                Successor.HandleRequest(context);
            }
        }