This commit is contained in:
@@ -12,11 +12,11 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace rockfishCore.Controllers
|
||||
{
|
||||
//### OUR ROUTE CALLED FROM ROCKFISH CLIENT ####
|
||||
//### OUR ROUTE CALLED FROM ROCKFISH CLIENT ####
|
||||
[Produces("application/json")]
|
||||
[Route("rvl")]
|
||||
[Authorize]
|
||||
public class RvlController : Controller
|
||||
public class RvlController : Controller
|
||||
{
|
||||
private readonly rockfishContext ct;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace rockfishCore.Controllers
|
||||
[Required]
|
||||
public Guid DbId { get; set; }
|
||||
[Required]
|
||||
public bool LicenseExpires {get;set;}
|
||||
public bool LicenseExpires { get; set; }
|
||||
[Required]
|
||||
public long LicenseExpiration { get; set; }
|
||||
[Required]
|
||||
@@ -56,13 +56,13 @@ namespace rockfishCore.Controllers
|
||||
}
|
||||
|
||||
|
||||
#if (DEBUG)
|
||||
private const string LICENSE_SERVER_URL = "http://localhost:3001/";
|
||||
public const string SUPPORT_EMAIL = "cardjohn@ayanova.com";
|
||||
#else
|
||||
private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
||||
public const string SUPPORT_EMAIL="support@ayanova.com";
|
||||
#endif
|
||||
// #if (DEBUG)
|
||||
// private const string LICENSE_SERVER_URL = "http://localhost:3001/";
|
||||
// public const string SUPPORT_EMAIL = "cardjohn@ayanova.com";
|
||||
// #else
|
||||
// private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
||||
// public const string SUPPORT_EMAIL="support@ayanova.com";
|
||||
// #endif
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Post([FromBody] dtoRavLicense l)
|
||||
@@ -144,42 +144,14 @@ namespace rockfishCore.Controllers
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("list/{siteId}")]
|
||||
public async Task<IActionResult> GetList(long siteId)
|
||||
{
|
||||
return Ok(await ct.License.AsNoTracking().Where(z => z.SiteId == siteId).OrderByDescending(z => z.Id).ToListAsync());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// [HttpGet("verify/{code}")]
|
||||
// public async Task<IActionResult> GetVerify([FromRoute] string code)
|
||||
// {
|
||||
// //is there a valid trial request
|
||||
// var req = await ct.TrialRequest.Where(z => z.EmailConfirmCode == code && z.DtFetched == null && z.Status == TrialRequest.TrialRequestStatus.NotSet).FirstOrDefaultAsync();
|
||||
// if (req == null)
|
||||
// {
|
||||
// return new ContentResult
|
||||
// {
|
||||
// ContentType = "text/html",
|
||||
// StatusCode = 200,
|
||||
// Content = "<html><body><h4>Request not found</h4><p>There was no evaluation request associated with this verification code.</p></body></html>"
|
||||
// };
|
||||
// }
|
||||
|
||||
// req.EmailValidated = true;
|
||||
// await ct.SaveChangesAsync();
|
||||
|
||||
// //notify *us*
|
||||
// //http://localhost:3001/default.htm#!/trials/[id]
|
||||
// var rfUrl = LICENSE_SERVER_URL + $"default.htm#!/trialEdit/{req.Id}";
|
||||
// var body = $"Email address {req.Email} was just verified for {req.ContactName} at {req.CompanyName}.\r\nTrial key is ready to be processed now:\r\n{rfUrl}";
|
||||
// //send confirmation email
|
||||
// RfMail.SendMessage("support@ayanova.com", SUPPORT_EMAIL, "AyaNova trial request requiring action", body, false);
|
||||
|
||||
// return new ContentResult
|
||||
// {
|
||||
// ContentType = "text/html",
|
||||
// StatusCode = 200,
|
||||
// Content = "<html><body><h4>Email validated!</h4><p>Your request is being processed and you will receive an email with instructions for starting your AyaNova evaluation.</p></body></html>"
|
||||
// };
|
||||
// }
|
||||
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -55,39 +55,19 @@ app.ravLicenses = (function() {
|
||||
$appList.append('<ul class="list-group">');
|
||||
|
||||
$.each(res, function(i, obj) {
|
||||
if (obj.fetched) {
|
||||
|
||||
$appList.append(
|
||||
"<li class='rfc-list-item-inactive list-group-item'><a href=\"#!/ravLicense/" +
|
||||
"<li class='list-group-item'><a href=\"#!/ravLicense/" +
|
||||
obj.id +
|
||||
'">' +
|
||||
"<span class='text-muted'>" +
|
||||
(obj.trial
|
||||
? "Trial "
|
||||
: "") +
|
||||
'">' +
|
||||
app.utilB.genListColumn(obj.regto) +
|
||||
" " +
|
||||
app.utilB.genListColumn(
|
||||
app.utilB.epochToShortDate(obj.created)
|
||||
) +
|
||||
"</span>" +
|
||||
"</a></li>"
|
||||
);
|
||||
} else {
|
||||
$appList.append(
|
||||
"<li class='list-group-item'><a href=\"#!/licenseView/" +
|
||||
obj.id +
|
||||
'">' +
|
||||
(obj.trial
|
||||
? "Trial "
|
||||
: "") +
|
||||
app.utilB.genListColumn(obj.regto) +
|
||||
" " +
|
||||
app.utilB.genListColumn(
|
||||
app.utilB.epochToShortDate(obj.created)
|
||||
app.utilB.epochToShortDate(obj.dtCreated)
|
||||
) +
|
||||
"</a></li>"
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$appList.append("</ul>");
|
||||
|
||||
Reference in New Issue
Block a user