=> CommonMark.NET + Fixes code + refact

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

@ -6,8 +6,8 @@
], ],
"sdk": { "sdk": {
"version": "1.0.0-rc1-update2", "version": "1.0.0-rc1-update2",
"runtime": "mono", "runtime": "mono",
"architecture": "x64" "architecture": "x64"
}, },
"packages": "packages" "packages": "packages"
} }

@ -19,14 +19,16 @@ namespace Yavsc
public const string CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company"; 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 UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9._-]*$";
public const string UserFileNamePatternRegExp = @"^([a-zA-Z0-9._-]*/)*[a-zA-Z0-9._-]+$"; public const string UserFileNamePatternRegExp = @"^([a-zA-Z0-9._-]*/)*[a-zA-Z0-9._-]+$";
public const string AuthorizePath = "/authorize"; public const string AuthorizePath = "~/authorize";
public const string TokenPath = "/token"; public const string TokenPath = "~/token";
public const string LoginPath = "/signin"; public const string LoginPath = "~/signin";
public const string LogoutPath = "/signout"; public const string LogoutPath = "~/signout";
public const string UserInfoPath = "/api/me";
public const string SignalRPath = "/api/signalr"; 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 LiveUserPath = "live";
public const string ApplicationAuthenticationSheme = "ServerCookie"; public const string ApplicationAuthenticationSheme = "ServerCookie";
@ -41,9 +43,6 @@ namespace Yavsc
public const string StarHunterGroupName = "StarHunter"; public const string StarHunterGroupName = "StarHunter";
public const string BlogModeratorGroupName = "Moderator"; public const string BlogModeratorGroupName = "Moderator";
public const string FrontOfficeGroupName = "FrontOffice"; 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 DefaultAvatar = "/images/Users/icon_user.png";
public const string AnonAvatar = "/images/Users/icon_anon_user.png"; public const string AnonAvatar = "/images/Users/icon_anon_user.png";
public const string YavscConnectionStringEnvName = "YAVSC_DB_CONNECTION"; public const string YavscConnectionStringEnvName = "YAVSC_DB_CONNECTION";

@ -160,4 +160,4 @@ namespace Yavsc.Controllers
} }
} }
} }

@ -31,7 +31,7 @@ namespace Yavsc
UserFilesOptions = new FileServerOptions() UserFilesOptions = new FileServerOptions()
{ {
FileProvider = new PhysicalFileProvider(AbstractFileSystemHelpers.UserFilesDirName), FileProvider = new PhysicalFileProvider(AbstractFileSystemHelpers.UserFilesDirName),
RequestPath = new PathString(Constants.UserFilesPath), RequestPath = PathString.FromUriComponent(Constants.UserFilesPath),
EnableDirectoryBrowsing = env.IsDevelopment(), EnableDirectoryBrowsing = env.IsDevelopment(),
}; };
UserFilesOptions.EnableDefaultFiles=true; UserFilesOptions.EnableDefaultFiles=true;
@ -56,7 +56,7 @@ namespace Yavsc
AvatarsOptions = new FileServerOptions() AvatarsOptions = new FileServerOptions()
{ {
FileProvider = new PhysicalFileProvider(AvatarsDirName), FileProvider = new PhysicalFileProvider(AvatarsDirName),
RequestPath = new PathString(Constants.AvatarsPath), RequestPath = PathString.FromUriComponent(Constants.AvatarsPath),
EnableDirectoryBrowsing = env.IsDevelopment() EnableDirectoryBrowsing = env.IsDevelopment()
}; };
@ -67,7 +67,7 @@ namespace Yavsc
GitOptions = new FileServerOptions() GitOptions = new FileServerOptions()
{ {
FileProvider = new PhysicalFileProvider(GitDirName), FileProvider = new PhysicalFileProvider(GitDirName),
RequestPath = new PathString(Constants.GitPath), RequestPath = PathString.FromUriComponent(Constants.GitPath),
EnableDirectoryBrowsing = env.IsDevelopment(), EnableDirectoryBrowsing = env.IsDevelopment(),
}; };
GitOptions.DefaultFilesOptions.DefaultFileNames.Add("index.md"); GitOptions.DefaultFilesOptions.DefaultFileNames.Add("index.md");

@ -22,7 +22,7 @@ namespace Yavsc
}; };
app.UseWebSockets(webSocketOptions); app.UseWebSockets(webSocketOptions);
app.UseSignalR(Constants.SignalRPath); app.UseSignalR(PathString.FromUriComponent(Constants.SignalRPath));
} }
private async Task Echo(HttpContext context, WebSocket webSocket) private async Task Echo(HttpContext context, WebSocket webSocket)
@ -39,4 +39,4 @@ namespace Yavsc
} }
} }
} }

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

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

@ -75,7 +75,7 @@
"defaultNamespace": "Yavsc" "defaultNamespace": "Yavsc"
}, },
"dependencies": { "dependencies": {
"CommonMark": "0.11.0", "ya.CommonMark.NET": "0.11.0",
"EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.Core": "7.0.0-rc1-final", "EntityFramework.Core": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",

Loading…