=> CommonMark.NET + Fixes code + refact

vnext
Paul Schneider 5 years ago
parent 0fc8f53a14
commit 3c961ab0c7
8 changed files with 18 additions and 19 deletions

@ -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";

@ -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");

@ -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)

@ -1,4 +1,4 @@
@model RegisterViewModel
@model RegisterModel
@{
ViewData["Title"] = @SR["Register"];
}

@ -1,4 +1,4 @@
@model RegisterViewModel
@model RegisterModel
@{
ViewData["Title"] = @SR["Register"];
}

@ -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",

Loading…