mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
4c303d358b
* Remove deprecated CSS options Closes #5945. * Greenfield: Add brandColor to store APIs Closes #5946. * Migrate file IDs to URLs Closes #5953. * Greenfield: Add CSS and logo URL to store settings API Closes #5945. * Add migration test * Store and Server branding can reference file's via fileid:ID * Add PaymentSoundUrl to Store API --------- Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
26 lines
704 B
C#
26 lines
704 B
C#
using System;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public record UnresolvedUri
|
|
{
|
|
public static UnresolvedUri Create(string str)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(str);
|
|
if (str.StartsWith("fileid:", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
return new FileIdUri(str.Substring("fileid:".Length));
|
|
}
|
|
return new Raw(str);
|
|
}
|
|
public record FileIdUri(string FileId) : UnresolvedUri
|
|
{
|
|
public override string ToString() => $"fileid:{FileId}";
|
|
}
|
|
public record Raw(string Uri) : UnresolvedUri
|
|
{
|
|
public override string ToString() => Uri;
|
|
}
|
|
}
|
|
}
|