This commit is contained in:
2025-04-30 09:51:36 +08:00
parent 561881c9aa
commit 09afa239a6
848 changed files with 385870 additions and 205 deletions

View File

@@ -0,0 +1,23 @@

namespace Yes.Application.Admins.Themes
{
public class ThemeService(IWebHostEnvironment env) : IThemeService
{
private readonly IWebHostEnvironment _env = env;
public void CheckThemeExists(string theme)
{
var themePath = Path.Combine(_env.ContentRootPath, "files", "themes");
var directories = Directory.GetDirectories(themePath);
var jsonPath = Path.Combine(themePath, theme, "config.json");
if (!File.Exists(jsonPath))
{
throw new ThemeNotExistsException(theme);
}
}
}
}