From 44577c1bd2fef9b1d9bb343938f5fbe24f3d4071 Mon Sep 17 00:00:00 2001 From: LWangllix Date: Wed, 21 Feb 2024 18:15:01 +0200 Subject: [PATCH] fix --- services/tenants.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/tenants.service.ts b/services/tenants.service.ts index c453a13..b4cca2c 100644 --- a/services/tenants.service.ts +++ b/services/tenants.service.ts @@ -3,18 +3,18 @@ import moleculer, { Context } from 'moleculer'; import { Action, Service } from 'moleculer-decorators'; -import { UserAuthMeta } from './api.service'; import DbConnection from '../mixins/database.mixin'; import { - COMMON_FIELDS, + BaseModelInterface, COMMON_DEFAULT_SCOPES, + COMMON_FIELDS, COMMON_SCOPES, - FieldHookCallback, - BaseModelInterface, EndpointType, - throwUnauthorizedError, + FieldHookCallback, throwNotFoundError, + throwUnauthorizedError, } from '../types'; +import { UserAuthMeta } from './api.service'; import { TenantUser, TenantUserRole } from './tenantUsers.service'; import { User, UserType } from './users.service'; @@ -295,7 +295,7 @@ export default class TenantsService extends moleculer.Service { 'tenantUsers.createRelationshipsIfNeeded', { companyName, - authGroup, + authGroup: { ...authGroup, role: authUser?.role }, companyEmail, companyPhone, userId: user.id,