1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00
Radarr/NzbDrone.Api/Frontend/StaticResourceMapper.cs
kay.one 375f887539 using pre-compiled handlebar templates
re-did static content from nancy
2013-03-29 16:00:38 -07:00

21 lines
485 B
C#

using System.IO;
namespace NzbDrone.Api.Frontend
{
public interface IMapHttpRequestsToDisk
{
string Map(string resourceUrl);
}
public class StaticResourceMapper : IMapHttpRequestsToDisk
{
public string Map(string resourceUrl)
{
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
return Path.Combine("ui", path);
}
}
}