1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-09 23:00:57 -05:00

support custom master url

refactor api instatation to allow custom master url in config
This commit is contained in:
RaidMax
2020-06-30 16:39:32 -05:00
parent ff502cb376
commit 9b9c1bd851
14 changed files with 262 additions and 269 deletions

View File

@ -541,10 +541,6 @@ namespace SharedLibraryCore.Services
LastConnection = client.LastConnection
};
#if DEBUG == true
var clientsSql = iqClients.ToSql();
#endif
return await iqClients.ToListAsync();
}
}
@ -601,9 +597,7 @@ namespace SharedLibraryCore.Services
LastConnection = _client.LastConnection,
ClientId = _client.ClientId,
});
#if DEBUG == true
var iqClientsSql = iqClients.ToSql();
#endif
var clients = await iqClientProjection.ToListAsync();
// this is so we don't try to evaluate this in the linq to entities query
@ -635,9 +629,7 @@ namespace SharedLibraryCore.Services
{
var startOfPeriod = DateTime.UtcNow.AddHours(-24);
var iqQuery = context.Clients.Where(_client => _client.LastConnection >= startOfPeriod);
#if DEBUG
string sql = iqQuery.ToSql();
#endif
return await iqQuery.CountAsync();
}
}
@ -664,9 +656,6 @@ namespace SharedLibraryCore.Services
LastConnection = _client.FirstConnection
});
#if DEBUG
var sql = iqClients.ToSql();
#endif
return await iqClients.ToListAsync();
}
}

View File

@ -88,9 +88,6 @@ namespace SharedLibraryCore.Services
IsEvade = _penalty.IsEvadedOffense
});
#if DEBUG == true
var querySql = iqPenalties.ToSql();
#endif
return await iqPenalties.ToListAsync();
}
}
@ -136,9 +133,6 @@ namespace SharedLibraryCore.Services
IsEvade = _penalty.IsEvadedOffense
});
#if DEBUG == true
var querySql = iqPenalties.ToSql();
#endif
return await iqPenalties.Distinct().ToListAsync();
}
}
@ -167,11 +161,6 @@ namespace SharedLibraryCore.Services
.SelectMany(a => a.Link.ReceivedPenalties)
.Where(filter);
#if DEBUG == true
var penaltiesSql = iqLinkPenalties.ToSql();
var ipPenaltiesSql = iqIPPenalties.ToSql();
#endif
var activePenalties = (await iqLinkPenalties.ToListAsync())
.Union(await iqIPPenalties.ToListAsync())
.Distinct();