feat: add admin panel

This commit is contained in:
2026-06-15 20:54:05 +03:30
parent 7dadb23fbe
commit 02060a4dc0
16 changed files with 698 additions and 108 deletions
+4 -1
View File
@@ -23,6 +23,9 @@ func setup(t *testing.T) (*Service, int64) {
}
id, _ := res.LastInsertId()
svc := New(st.DB, DevAdVerifier{}, DevIAPVerifier{})
if err := svc.LoadCatalog(context.Background()); err != nil {
t.Fatalf("load catalog: %v", err)
}
return svc, id
}
@@ -156,7 +159,7 @@ func TestPurchaseCreditsAndIdempotent(t *testing.T) {
if err := svc.VerifyPurchase(ctx, id, req); err != nil {
t.Fatalf("purchase: %v", err)
}
pkg := findCoinPackage("small")
pkg := svc.findCoinPackage("small")
if c := coinsOf(t, svc, id); c != pkg.Coins {
t.Fatalf("want %d coins, got %d", pkg.Coins, c)
}