1
0
mirror of https://github.com/bitwarden/server synced 2026-02-25 17:03:22 +00:00

[PM-30108] import discount from stripe (#6982)

* [PM-30108] import discount from stripe

* fix repo tests

* pr feedback

* wrap discounts in feature flag

* claude pr feedback
This commit is contained in:
Kyle Denney
2026-02-17 12:57:14 -06:00
committed by GitHub
parent 3753a5e853
commit f0c69cedc2
24 changed files with 1521 additions and 1 deletions

View File

@@ -48,4 +48,18 @@ public class SubscriptionDiscountRepository(
return result == null ? null : Mapper.Map<SubscriptionDiscount>(result);
}
public async Task<ICollection<SubscriptionDiscount>> ListAsync(int skip, int take)
{
using var serviceScope = ServiceScopeFactory.CreateScope();
var databaseContext = GetDatabaseContext(serviceScope);
var results = await databaseContext.SubscriptionDiscounts
.OrderByDescending(sd => sd.CreationDate)
.Skip(skip)
.Take(take)
.ToArrayAsync();
return Mapper.Map<List<SubscriptionDiscount>>(results);
}
}