This commit is contained in:
2018-07-25 23:04:41 +00:00
parent 4d21be0a5b
commit e50ca91179
2 changed files with 45 additions and 1 deletions

View File

@@ -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

View File

@@ -106,7 +106,7 @@ namespace rockfishCore
//Check schema
RfSchema.CheckAndUpdate(dbContext);
bool bMM=RfMail.MailIsMirroringProperly();
//bool bMM=RfMail.MailIsMirroringProperly();
}//eof
}