feat: billing

This commit is contained in:
David Nguyen
2025-05-19 12:38:50 +10:00
parent 7abfc9e271
commit 2805478e0d
221 changed files with 8436 additions and 5847 deletions

View File

@ -17,11 +17,11 @@ export const limitsHandler = async (req: Request) => {
teamId = parseInt(rawTeamId, 10);
}
if (!teamId && rawTeamId) {
if (!teamId) {
throw new Error(ERROR_CODES.INVALID_TEAM_ID);
}
const limits = await getServerLimits({ email: user.email, teamId });
const limits = await getServerLimits({ userId: user.id, teamId });
return Response.json(limits, {
status: 200,