Fix tests
This commit is contained in:
parent
ac1da306f9
commit
31f94f6c3c
|
@ -10,12 +10,12 @@ import {
|
|||
GroupAddedOnboardingEvent,
|
||||
GroupPermissionsEditedEvent,
|
||||
} from "@budibase/types"
|
||||
import { context } from "../.."
|
||||
import { isScim } from "../../context"
|
||||
|
||||
async function created(group: UserGroup, timestamp?: number) {
|
||||
const properties: GroupCreatedEvent = {
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -26,7 +26,7 @@ async function created(group: UserGroup, timestamp?: number) {
|
|||
async function updated(group: UserGroup) {
|
||||
const properties: GroupUpdatedEvent = {
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -37,7 +37,7 @@ async function updated(group: UserGroup) {
|
|||
async function deleted(group: UserGroup) {
|
||||
const properties: GroupDeletedEvent = {
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -49,7 +49,7 @@ async function usersAdded(count: number, group: UserGroup) {
|
|||
const properties: GroupUsersAddedEvent = {
|
||||
count,
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -61,7 +61,7 @@ async function usersDeleted(count: number, group: UserGroup) {
|
|||
const properties: GroupUsersDeletedEvent = {
|
||||
count,
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
|
|
@ -15,12 +15,12 @@ import {
|
|||
UserUpdatedEvent,
|
||||
UserOnboardingEvent,
|
||||
} from "@budibase/types"
|
||||
import { context } from "../.."
|
||||
import { isScim } from "../../context"
|
||||
|
||||
async function created(user: User, timestamp?: number) {
|
||||
const properties: UserCreatedEvent = {
|
||||
userId: user._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
email: user.email,
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ async function created(user: User, timestamp?: number) {
|
|||
async function updated(user: User) {
|
||||
const properties: UserUpdatedEvent = {
|
||||
userId: user._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
email: user.email,
|
||||
},
|
||||
|
@ -42,7 +42,7 @@ async function updated(user: User) {
|
|||
async function deleted(user: User) {
|
||||
const properties: UserDeletedEvent = {
|
||||
userId: user._id as string,
|
||||
viaScim: context.isScim(),
|
||||
viaScim: isScim(),
|
||||
audited: {
|
||||
email: user.email,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue