diff --git a/SSO-Auth/Api/SSOViewsController.cs b/SSO-Auth/Api/SSOViewsController.cs
index ed2c55c..483cfdc 100644
--- a/SSO-Auth/Api/SSOViewsController.cs
+++ b/SSO-Auth/Api/SSOViewsController.cs
@@ -90,46 +90,14 @@ public class SSOViewsController : ControllerBase
}
///
- /// Gets the html view for the linking interface.
+ /// Gets a html view.
///
- /// The html view for the linking interface.
+ /// The name of the view / asset to fetch.
+ /// The html view with the specified name.
// [Authorize(Policy = "DefaultAuthorization")]
- [HttpGet("linking")]
- public ActionResult GetLinkingView()
+ [HttpGet("{viewName}")]
+ public ActionResult GetView([FromRoute] string viewName)
{
- return ServeView("SSO-Auth-linking");
- }
-
- ///
- /// Returns the client code for the linking view.
- ///
- /// The html view for the linking interface.
- // [Authorize(Policy = "DefaultAuthorization")]
- [HttpGet("linking.js")]
- public ActionResult GetLinkingJS()
- {
- return ServeView("SSO-Auth-linking.js");
- }
-
- ///
- /// Get the shared js module that initializes the ApiClient.
- ///
- /// Returns the shared js module that initializes the ApiClient.
- // [Authorize(Policy = "DefaultAuthorization")]
- [HttpGet("ApiClient.js")]
- public ActionResult GetApiClientView()
- {
- return ServeView("SSO-Auth-ApiClient.js");
- }
-
- ///
- /// Returns the css that is usually a part of the default view.
- ///
- /// A stylesheet.
- // [Authorize(Policy = "DefaultAuthorization")]
- [HttpGet("emby-restyle.css")]
- public ActionResult GetRestyledEmbyElements()
- {
- return ServeView("SSO-Auth-emby-restyle.css");
+ return ServeView(viewName);
}
}
\ No newline at end of file
diff --git a/SSO-Auth/SSOPlugin.cs b/SSO-Auth/SSOPlugin.cs
index a0e84fc..b6988c4 100644
--- a/SSO-Auth/SSOPlugin.cs
+++ b/SSO-Auth/SSOPlugin.cs
@@ -85,27 +85,27 @@ public class SSOPlugin : BasePlugin, IPlugin, IHasWebPages
{
new PluginPageInfo
{
- Name = Name + ".css",
+ Name = "style.css",
EmbeddedResourcePath = $"{GetType().Namespace}.Config.style.css"
},
new PluginPageInfo
{
- Name = Name + "-linking",
+ Name = "linking",
EmbeddedResourcePath = $"{GetType().Namespace}.Config.linking.html"
},
new PluginPageInfo
{
- Name = Name + "-linking.js",
+ Name = "linking.js",
EmbeddedResourcePath = $"{GetType().Namespace}.Config.linking.js"
},
new PluginPageInfo
{
- Name = Name + "-ApiClient.js",
+ Name = "ApiClient.js",
EmbeddedResourcePath = $"{GetType().Namespace}.Views.apiClient.js"
},
new PluginPageInfo
{
- Name = Name + "-emby-restyle.css",
+ Name = "emby-restyle.css",
EmbeddedResourcePath = $"{GetType().Namespace}.Views.emby-restyle.css"
},
};