mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
375f887539
re-did static content from nancy
21 lines
485 B
C#
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);
|
|
}
|
|
}
|
|
} |