diff --git a/global.json b/global.json index 9ef028da..e4059e57 100644 --- a/global.json +++ b/global.json @@ -6,8 +6,8 @@ ], "sdk": { "version": "1.0.0-rc1-update2", - "runtime": "mono", - "architecture": "x64" + "runtime": "mono", + "architecture": "x64" }, "packages": "packages" } diff --git a/src/Yavsc.Abstract/Constants.cs b/src/Yavsc.Abstract/Constants.cs index 54f3346c..0bdcf8f6 100644 --- a/src/Yavsc.Abstract/Constants.cs +++ b/src/Yavsc.Abstract/Constants.cs @@ -19,14 +19,16 @@ namespace Yavsc public const string CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company"; public const string UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9._-]*$"; public const string UserFileNamePatternRegExp = @"^([a-zA-Z0-9._-]*/)*[a-zA-Z0-9._-]+$"; - public const string AuthorizePath = "/authorize"; - public const string TokenPath = "/token"; - public const string LoginPath = "/signin"; - public const string LogoutPath = "/signout"; + public const string AuthorizePath = "~/authorize"; + public const string TokenPath = "~/token"; + public const string LoginPath = "~/signin"; + public const string LogoutPath = "~/signout"; - public const string UserInfoPath = "/api/me"; public const string SignalRPath = "/api/signalr"; + public const string UserFilesPath = "/files"; + public const string AvatarsPath = "/avatars"; + public const string GitPath = "/sources"; public const string LiveUserPath = "live"; public const string ApplicationAuthenticationSheme = "ServerCookie"; @@ -41,9 +43,6 @@ namespace Yavsc public const string StarHunterGroupName = "StarHunter"; public const string BlogModeratorGroupName = "Moderator"; public const string FrontOfficeGroupName = "FrontOffice"; - public const string UserFilesPath = "/files"; - public const string AvatarsPath = "/avatars"; - public const string GitPath = "/sources"; public const string DefaultAvatar = "/images/Users/icon_user.png"; public const string AnonAvatar = "/images/Users/icon_anon_user.png"; public const string YavscConnectionStringEnvName = "YAVSC_DB_CONNECTION"; diff --git a/src/Yavsc/Controllers/Accounting/OAuthController.cs b/src/Yavsc/Controllers/Accounting/OAuthController.cs index c7779152..62795c09 100644 --- a/src/Yavsc/Controllers/Accounting/OAuthController.cs +++ b/src/Yavsc/Controllers/Accounting/OAuthController.cs @@ -160,4 +160,4 @@ namespace Yavsc.Controllers } } -} \ No newline at end of file +} diff --git a/src/Yavsc/Startup/Startup.FileServer.cs b/src/Yavsc/Startup/Startup.FileServer.cs index 8b64831b..6499b77e 100644 --- a/src/Yavsc/Startup/Startup.FileServer.cs +++ b/src/Yavsc/Startup/Startup.FileServer.cs @@ -31,7 +31,7 @@ namespace Yavsc UserFilesOptions = new FileServerOptions() { FileProvider = new PhysicalFileProvider(AbstractFileSystemHelpers.UserFilesDirName), - RequestPath = new PathString(Constants.UserFilesPath), + RequestPath = PathString.FromUriComponent(Constants.UserFilesPath), EnableDirectoryBrowsing = env.IsDevelopment(), }; UserFilesOptions.EnableDefaultFiles=true; @@ -56,7 +56,7 @@ namespace Yavsc AvatarsOptions = new FileServerOptions() { FileProvider = new PhysicalFileProvider(AvatarsDirName), - RequestPath = new PathString(Constants.AvatarsPath), + RequestPath = PathString.FromUriComponent(Constants.AvatarsPath), EnableDirectoryBrowsing = env.IsDevelopment() }; @@ -67,7 +67,7 @@ namespace Yavsc GitOptions = new FileServerOptions() { FileProvider = new PhysicalFileProvider(GitDirName), - RequestPath = new PathString(Constants.GitPath), + RequestPath = PathString.FromUriComponent(Constants.GitPath), EnableDirectoryBrowsing = env.IsDevelopment(), }; GitOptions.DefaultFilesOptions.DefaultFileNames.Add("index.md"); diff --git a/src/Yavsc/Startup/Startup.WebSockets.cs b/src/Yavsc/Startup/Startup.WebSockets.cs index 94d264dc..187c7c19 100644 --- a/src/Yavsc/Startup/Startup.WebSockets.cs +++ b/src/Yavsc/Startup/Startup.WebSockets.cs @@ -22,7 +22,7 @@ namespace Yavsc }; app.UseWebSockets(webSocketOptions); - app.UseSignalR(Constants.SignalRPath); + app.UseSignalR(PathString.FromUriComponent(Constants.SignalRPath)); } private async Task Echo(HttpContext context, WebSocket webSocket) @@ -39,4 +39,4 @@ namespace Yavsc } } -} \ No newline at end of file +} diff --git a/src/Yavsc/Views/Account/Register.cshtml b/src/Yavsc/Views/Account/Register.cshtml index e8a650cf..e5961312 100755 --- a/src/Yavsc/Views/Account/Register.cshtml +++ b/src/Yavsc/Views/Account/Register.cshtml @@ -1,4 +1,4 @@ -@model RegisterViewModel +@model RegisterModel @{ ViewData["Title"] = @SR["Register"]; } diff --git a/src/Yavsc/Views/Account/Register.fr.cshtml b/src/Yavsc/Views/Account/Register.fr.cshtml index f1761a43..687e8ba7 100755 --- a/src/Yavsc/Views/Account/Register.fr.cshtml +++ b/src/Yavsc/Views/Account/Register.fr.cshtml @@ -1,4 +1,4 @@ -@model RegisterViewModel +@model RegisterModel @{ ViewData["Title"] = @SR["Register"]; } diff --git a/src/Yavsc/project.json b/src/Yavsc/project.json index 166769f8..c7920c91 100644 --- a/src/Yavsc/project.json +++ b/src/Yavsc/project.json @@ -75,7 +75,7 @@ "defaultNamespace": "Yavsc" }, "dependencies": { - "CommonMark": "0.11.0", + "ya.CommonMark.NET": "0.11.0", "EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.Core": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",