renaming of the 3Blog3 setting => UserFilesRoot
All checks were successful
Dotnet build and test / build (pull_request) Successful in 33m37s
All checks were successful
Dotnet build and test / build (pull_request) Successful in 33m37s
This commit is contained in:
parent
f9d95fd98f
commit
446b595077
18 changed files with 30 additions and 39 deletions
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc.Blogs;
|
||||
|
||||
public static class BlogConstants
|
||||
{
|
||||
public const string AdminRole = "Admin";
|
||||
public const string ModeratorRole = "Moderator";
|
||||
public const string UserRole = "User";
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ namespace Yavsc.Blogs.Controllers
|
|||
if (string.IsNullOrEmpty(ownerUserName))
|
||||
return NotFound(new { error = "owner not found" });
|
||||
|
||||
var physicalPath = Path.Combine(siteSettings.Blog, ownerUserName, file.Path ?? "");
|
||||
var physicalPath = Path.Combine(siteSettings.UserFilesRoot, ownerUserName, file.Path ?? "");
|
||||
var fi = new FileInfo(physicalPath);
|
||||
if (!fi.Exists) return NotFound(new { error = "file not on disk" });
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ using Yavsc.Models;
|
|||
using Yavsc.Services;
|
||||
using Yavsc.Server.Helpers;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.Options;
|
||||
namespace Yavsc.Blogs;
|
||||
|
||||
internal class Program
|
||||
|
|
@ -85,9 +84,9 @@ internal class Program
|
|||
})
|
||||
.Configure<SiteSettings>(settings =>
|
||||
{
|
||||
if (settings.Blog == null)
|
||||
if (settings.UserFilesRoot == null)
|
||||
{
|
||||
settings.Blog = "blog";
|
||||
settings.UserFilesRoot = "blog";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"https://localhost:5005",
|
||||
"https://api.pschneider.fr"
|
||||
],
|
||||
"Blog": "blog"
|
||||
"UserFilesRoot": "files"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"YavscConnection": "Server=localhost;Port=5432;Database=lame-db-name;Username=lame-user-name;Password=lame-password;"
|
||||
|
|
|
|||
Loading…
Reference in a new issue