react-version #1

Merged
memartel_loc merged 290 commits from react-version into main 2023-11-04 09:48:15 -04:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 8b776405be - Show all commits

View File

@ -38,7 +38,7 @@ public class ImageController : ControllerBase {
string path, filename, filetype;
IQueryable<ProductModel> query;
if (_cache is not null)
if (_cache is not null && _cache.isOk())
query = _cache.queryCache();
else query = _context.Products;
@ -54,7 +54,7 @@ public class ImageController : ControllerBase {
Path.GetFileNameWithoutExtension(filename) +
(thumbnail == true ? "_thumbnail" : "") +
Path.GetExtension(filename));
if (!System.IO.File.Exists(path)) {
_logger.LogError(8, "Unable to find image. Sending default image instead...");
path = Path.Combine(_hostEnvironment.ContentRootPath, "Images", "default.jpg");

View File

@ -116,7 +116,7 @@ public class DatabaseCacheService {
}
return copy;
}
public IQueryable<ProductModel> queryCache() {
public IQueryable<ProductModel>? queryCache() {
if (!_ok)
return null;
try {