fix: credit balance issues (#21904)
* fix creating user balance * fix org check if teamId is given * adjust hasAvailableCredits function * improve comments * fix creditBalance.create * adjust test --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
This commit is contained in:
1 parent
a37f1d9798
commit
c215dc5864
4 files changed
+22
-3
No files matched your search
@@ -121,7 +121,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
if (!orgId) {
|
||||
orgId = await getOrgIdFromMemberOrTeamId({
|
||||
memberId: parsedUserId,
|
||||
...(!parsedTeamId ? { memberId: parsedUserId } : {}),
|
||||
teamId: parsedTeamId,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user