renaming of the 3Blog3 setting => UserFilesRoot
All checks were successful
Dotnet build and test / build (pull_request) Successful in 33m37s

This commit is contained in:
Paul Schneider 2026-10-11 00:16:44 +01:00
commit 446b595077
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
18 changed files with 30 additions and 39 deletions

View file

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

View file

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

View file

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

View file

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