1
0
Fork 0
mirror of synced 2024-07-03 13:30:46 +12:00

return all when in single tenant env

This commit is contained in:
Martin McKeaveney 2023-03-07 09:49:58 +00:00
parent ea5e564428
commit b839eafbe3

View file

@ -1,4 +1,5 @@
import { redis, utils } from "@budibase/backend-core"
import env from "../environment"
function getExpirySecondsForDB(db: string) {
switch (db) {
@ -142,5 +143,8 @@ export async function getInviteCodes(tenantIds?: string[]) {
code: invite.key,
}
})
if (!env.MULTI_TENANCY) {
return results
}
return results.filter(invite => tenantIds?.length && tenantIds.includes(invite.info.tenantId))
}