Fixed RSS 404

This commit is contained in:
Fergal Moran
2018-05-06 23:45:03 +01:00
parent c0bf822fe0
commit d16eb976fc

View File

@@ -50,8 +50,7 @@ namespace PodNoms.Api.Controllers {
if (user != null) {
var podcast = await _podcastRepository.GetAsync(user.Id, entry);
if (podcast != null) {
string xml = System.IO.File.ReadAllText("/tmp/podcast.xml");
// string xml = await ResourceReader.ReadResource("podcast.xml");
string xml = await ResourceReader.ReadResource("podcast.xml");
var template = Handlebars.Compile(xml);
var compiled = new PodcastEnclosureViewModel {
Title = podcast.Title,
@@ -82,6 +81,8 @@ namespace PodNoms.Api.Controllers {
var result = template(compiled);
return Content(result, "application/xml", Encoding.UTF8);
}
} else {
_logger.LogError($"Unable to find user {slug}");
}
return NotFound();
}