Move towards explicit types
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user