This commit is contained in:
@@ -59,7 +59,9 @@ namespace Sockeye.Api.Controllers
|
||||
//Get the most recent key for this dbid regardless if fetched or not, most recent is most recent and supersedes any other keys
|
||||
//for the same database id
|
||||
//this means if a user requests a trial key then buys a key but both are unfetched the bought key takes precedence or vice versa
|
||||
var license = await ct.License.OrderByDescending(z => z.Id).Where(z => z.DbId == FetchRequestDbId).FirstOrDefaultAsync();
|
||||
var license = await ct.License.OrderByDescending(z => z.Id)
|
||||
.Where(z => z.DbId == FetchRequestDbId && z.Active == true)
|
||||
.FirstOrDefaultAsync();
|
||||
if (license != null)
|
||||
{
|
||||
//Found a recent purchased key, if not fetched then can be sent
|
||||
|
||||
Reference in New Issue
Block a user