diff --git a/src/modules/auth/auth.service.ts b/src/modules/auth/auth.service.ts index cc13c1719..05f153123 100644 --- a/src/modules/auth/auth.service.ts +++ b/src/modules/auth/auth.service.ts @@ -73,11 +73,8 @@ export default class AuthenticationService { const newOrganisation = await this.organisationService.create(createOrganisationPayload); - const userOrganisations = await this.organisationService.getAllUserOrganisations(user.id); - + const userOrganisations = await this.organisationService.getAllUserOrganisations(user.id, 1, 10); const isSuperAdmin = userOrganisations.map(instance => instance.user_role).includes('super-admin'); - const userOranisations = await this.organisationService.getAllUserOrganisations(user.id, 1, 10); - const token = (await this.otpService.createOtp(user.id, manager)).token;