Move towards explicit types

This commit is contained in:
2024-01-05 15:22:16 -08:00
parent db05b0b815
commit 5b367121c4
4 changed files with 15 additions and 15 deletions

View File

@@ -34,7 +34,7 @@ namespace AS1024.GeoFeed.Controllers
&& environment.IsProduction())
{
feed = await builder.GetGeoFeedData();
var cacheEntryOptions = new MemoryCacheEntryOptions()
MemoryCacheEntryOptions cacheEntryOptions = new MemoryCacheEntryOptions()
.SetSlidingExpiration(TimeSpan.FromMinutes(15));
memoryCache.Set(GeoFeedCacheKey, feed, cacheEntryOptions);
} else
@@ -42,9 +42,9 @@ namespace AS1024.GeoFeed.Controllers
feed = await builder.GetGeoFeedData();
}
var csvContent = feed.ToGeoFeedCsv(); // Assuming ToGeoFeedCsv() returns a string in CSV format.
var contentBytes = Encoding.UTF8.GetBytes(csvContent);
var contentType = "text/csv";
string csvContent = feed.ToGeoFeedCsv(); // Assuming ToGeoFeedCsv() returns a string in CSV format.
byte[] contentBytes = Encoding.UTF8.GetBytes(csvContent);
string contentType = "text/csv";
return new FileContentResult(contentBytes, contentType)
{