Move more constant texts in a constant string
This commit is contained in:
@@ -9,6 +9,8 @@ namespace AS1024.GeoFeed.Core.WebLogic
|
||||
public class GeoFeedReturn
|
||||
{
|
||||
private const string GeoFeedCacheKey = "GeoFeedData";
|
||||
private const string GeoFeedMimeTypeReturn = "text/csv";
|
||||
private const string GeoFeedFileName = "geofeed.csv";
|
||||
private readonly IGeoFeedProvider provider;
|
||||
private readonly ILogger<GeoFeedReturn> logger;
|
||||
private readonly IGeoFeedPersistentCacheProvider cacheProvider;
|
||||
@@ -46,8 +48,8 @@ namespace AS1024.GeoFeed.Core.WebLogic
|
||||
}
|
||||
|
||||
return Results.File(Encoding.UTF8.GetBytes(feed.ToGeoFeedCsv(true, isCached)),
|
||||
"text/csv",
|
||||
"geofeed.csv");
|
||||
GeoFeedMimeTypeReturn,
|
||||
GeoFeedFileName);
|
||||
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
@@ -56,8 +58,8 @@ namespace AS1024.GeoFeed.Core.WebLogic
|
||||
string geoFeedData = cacheProvider.GetGeoFeed();
|
||||
|
||||
return Results.File(Encoding.UTF8.GetBytes(geoFeedData),
|
||||
"text/csv",
|
||||
"geofeed.csv");
|
||||
GeoFeedMimeTypeReturn,
|
||||
GeoFeedFileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user