Kieran
4de977c1dd
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Kieran <kieran@harkin.me> Reviewed-on: #65
26 lines
656 B
C#
26 lines
656 B
C#
using VoidCat.Database;
|
|
using VoidCat.Services.Abstractions;
|
|
|
|
namespace VoidCat.Services.Payment;
|
|
|
|
/// <inheritdoc cref="IPaymentOrderStore"/>
|
|
public class CachePaymentOrderStore : BasicCacheStore<PaywallOrder>, IPaymentOrderStore
|
|
{
|
|
public CachePaymentOrderStore(ICache cache) : base(cache)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public async ValueTask UpdateStatus(Guid order, PaywallOrderStatus status)
|
|
{
|
|
var old = await Get(order);
|
|
if (old == default) return;
|
|
|
|
old.Status = status;
|
|
|
|
await Add(order, old);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override string MapKey(Guid id) => $"payment:order:{id}";
|
|
} |