allows users to inject their own logo.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-30 14:42:54 -07:00
parent 4a007530a6
commit b249ccdd6c
2 changed files with 12 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ namespace CarCareTracker.Helper
{
UserConfig GetUserConfig(ClaimsPrincipal user);
bool SaveUserConfig(ClaimsPrincipal user, UserConfig configData);
string GetLogoUrl();
public bool DeleteUserConfig(int userId);
}
public class ConfigHelper : IConfigHelper
@@ -24,6 +25,15 @@ namespace CarCareTracker.Helper
_userConfig = userConfig;
_cache = memoryCache;
}
public string GetLogoUrl()
{
var logoUrl = _config["LUBELOGGER_LOGO_URL"];
if (string.IsNullOrWhiteSpace(logoUrl))
{
logoUrl = "/defaults/lubelogger_logo.png";
}
return logoUrl;
}
public bool SaveUserConfig(ClaimsPrincipal user, UserConfig configData)
{
var storedUserId = user.FindFirstValue(ClaimTypes.NameIdentifier);