File size: 588 Bytes
249c849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { dbRepo } from "../src/infrastructure/db/repository.ts";

async function setup() {
  console.log("Setting up test tenant...");
  try {
    await dbRepo.createTenant({
        id: "tenant_test",
        apiKey: process.env.API_KEYS?.split(",")[0] || "",
        name: "Test Admin",
        dailyQuotaUsd: "10.0",
        alertThresholdRatio: "0.8",
        role: "admin",
        accountStatus: "active",
    });
    console.log("Tenant created successfully.");
  } catch (e: any) {
    console.log("Tenant already exists or error:", e.message);
  }
  process.exit(0);
}

setup();