From e50ca91179b87b932e38d9f1ca5b7fc677a595c4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 25 Jul 2018 23:04:41 +0000 Subject: [PATCH] --- Controllers/OpsController.cs | 44 ++++++++++++++++++++++++++++++++++++ Startup.cs | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Controllers/OpsController.cs diff --git a/Controllers/OpsController.cs b/Controllers/OpsController.cs new file mode 100644 index 0000000..b95aaf7 --- /dev/null +++ b/Controllers/OpsController.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.EntityFrameworkCore; +using rockfishCore.Models; +using rockfishCore.Util; + +namespace rockfishCore.Controllers +{ + [Produces("application/json")] + [Route("api/ops")] + [Authorize] + public class OpsController : Controller + { + private readonly rockfishContext _context; + + public OpsController(rockfishContext context) + { + _context = context; + } + + + //status of ops + [HttpGet("status")] + public dtoOpsStatus GetOpsStatus() + { + dtoOpsStatus ret= new dtoOpsStatus(); + ret.MailMirrorOK=RfMail.MailIsMirroringProperly(); + return ret; + } + + public class dtoOpsStatus + { + public bool MailMirrorOK; + + } + + + }//eoc +}//eons \ No newline at end of file diff --git a/Startup.cs b/Startup.cs index 82cbcd0..a5a86ea 100644 --- a/Startup.cs +++ b/Startup.cs @@ -106,7 +106,7 @@ namespace rockfishCore //Check schema RfSchema.CheckAndUpdate(dbContext); - bool bMM=RfMail.MailIsMirroringProperly(); + //bool bMM=RfMail.MailIsMirroringProperly(); }//eof }