This commit is contained in:
@@ -40,8 +40,12 @@ namespace rockfishCore.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//is there a valid trial request
|
//is there an Approved UnFetched trial request for this DB ID?
|
||||||
var req = await ct.TrialRequest.Where(z => z.DbId == dbid && z.DtFetched == null && z.Status == TrialRequest.TrialRequestStatus.Approved).FirstOrDefaultAsync();
|
var req = await ct.TrialRequest.Where(z => z.DbId == dbid && z.DtFetched == null && z.Status == TrialRequest.TrialRequestStatus.Approved).FirstOrDefaultAsync();
|
||||||
|
if (req == null)
|
||||||
|
{
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
LicenseKey = req.Key;
|
LicenseKey = req.Key;
|
||||||
req.DtFetched = DateUtil.NowAsEpoch();
|
req.DtFetched = DateUtil.NowAsEpoch();
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -60,20 +64,7 @@ namespace rockfishCore.Controllers
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
|
||||||
// //This is to simulate the scenarios where there is no license to return
|
|
||||||
// //either due to no current account / canceled or simply no license exists
|
|
||||||
// //Changes here must be reflected in RAVEN Util.License.Fetch block
|
|
||||||
// bool bTestStatusOtherThanOk = false;
|
|
||||||
// if (bTestStatusOtherThanOk)
|
|
||||||
// {
|
|
||||||
// return Json(new {Status="NONE", Reason="No license"});
|
|
||||||
// //return Json(new {Status="Canceled", Reason="Non payment"});
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// return Ok(RavenKeyFactory.GetRavenTestKey(dbid));
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user