mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
using pre-compiled handlebar templates
re-did static content from nancy
This commit is contained in:
21
NzbDrone.Api/Frontend/StaticResourceMapper.cs
Normal file
21
NzbDrone.Api/Frontend/StaticResourceMapper.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user