readibility update

This commit is contained in:
Peter Clement 2023-09-05 12:28:03 +01:00
parent 70c71c13bf
commit 1997cb5d6b
1 changed files with 6 additions and 8 deletions

View File

@ -368,14 +368,12 @@
},
]
if (creationRoleType !== Constants.BudibaseRoles.Admin) {
if (creationAccessType === Constants.Roles.CREATOR) {
payload[0].builder.apps = [prodAppId]
} else {
payload[0].apps = {
[prodAppId]: creationAccessType,
}
}
const notCreatingAdmin = creationRoleType !== Constants.BudibaseRoles.Admin
const isCreator = creationAccessType === Constants.Roles.CREATOR
if (notCreatingAdmin && isCreator) {
payload[0].builder.apps = [prodAppId]
} else if (notCreatingAdmin && !isCreator) {
payload[0].apps = { [prodAppId]: creationAccessType }
}
let userInviteResponse