37 lines
No EOL
1.2 KiB
C#
37 lines
No EOL
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
using WebsitePanel.WebDavPortal.DependencyInjection;
|
|
using WebsitePanel.WebDavPortal.UI.Routes;
|
|
|
|
namespace WebsitePanel.WebDavPortal.App_Start
|
|
{
|
|
public class WebApiConfig
|
|
{
|
|
public static void Register(HttpConfiguration configuration)
|
|
{
|
|
#region Owa
|
|
|
|
configuration.Routes.MapHttpRoute(
|
|
name: OwaRouteNames.GetFile,
|
|
routeTemplate: "owa/wopi*/files/{accessTokenId}/contents",
|
|
defaults: new {controller = "Owa", action = "GetFile"});
|
|
|
|
configuration.Routes.MapHttpRoute(
|
|
name: OwaRouteNames.CheckFileInfo,
|
|
routeTemplate: "owa/wopi*/files/{accessTokenId}",
|
|
defaults: new {controller = "Owa", action = "CheckFileInfo"});
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
configuration.Routes.MapHttpRoute("API Default", "api/{controller}/{id}",
|
|
new { id = RouteParameter.Optional });
|
|
|
|
configuration.DependencyResolver = new NinjectDependecyResolver();
|
|
}
|
|
}
|
|
} |