From 61722fa09905e432302ce4d9c5f23ffa25752c85 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Thu, 27 Jun 2024 16:31:20 +0200 Subject: [PATCH] Add store logo --- BTCPayApp.CommonServer/Models/AppUserInfo.cs | 1 + BTCPayServer/App/API/AppApiController.Account.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BTCPayApp.CommonServer/Models/AppUserInfo.cs b/BTCPayApp.CommonServer/Models/AppUserInfo.cs index 7bdffa9ac..7009563ca 100644 --- a/BTCPayApp.CommonServer/Models/AppUserInfo.cs +++ b/BTCPayApp.CommonServer/Models/AppUserInfo.cs @@ -59,6 +59,7 @@ public class AppUserStoreInfo { public string? Id { get; set; } public string? Name { get; set; } + public string? LogoUrl { get; set; } public string? RoleId { get; set; } public string? PosAppId { get; set; } public string? DefaultCurrency { get; set; } diff --git a/BTCPayServer/App/API/AppApiController.Account.cs b/BTCPayServer/App/API/AppApiController.Account.cs index b3985e843..cb12f1b94 100644 --- a/BTCPayServer/App/API/AppApiController.Account.cs +++ b/BTCPayServer/App/API/AppApiController.Account.cs @@ -274,7 +274,10 @@ public partial class AppApiController RoleId = userStore.StoreRole.Id, PosAppId = posApp?.Id, DefaultCurrency = storeBlob.DefaultCurrency, - Permissions = userStore.StoreRole.Permissions + Permissions = userStore.StoreRole.Permissions, + LogoUrl = storeBlob.LogoUrl != null + ? await uriResolver.Resolve(Request.GetAbsoluteRootUri(), storeBlob.LogoUrl) + : null, }); }