From 73bc7dbd40128cda31eff1e8865aea93e2db2be1 Mon Sep 17 00:00:00 2001 From: Kyle Baran Date: Wed, 30 Aug 2023 10:32:26 -0700 Subject: [PATCH] Fixed bug in invite searching --- packages/server-core/src/seeder-config.ts | 5 +++-- packages/server-core/src/services.ts | 5 +++-- packages/server-core/src/social/invite/invite.class.ts | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/server-core/src/seeder-config.ts b/packages/server-core/src/seeder-config.ts index 8975a5306e..c6e586e711 100755 --- a/packages/server-core/src/seeder-config.ts +++ b/packages/server-core/src/seeder-config.ts @@ -46,8 +46,9 @@ const installedProjects = fs.existsSync(path.resolve(__dirname, '../../projects/ .filter((dirent) => dirent.isDirectory()) .map((dirent) => { try { - const config: ProjectConfigInterface = - require(`../../projects/projects/${dirent.name}/xrengine.config.ts`).default + const config: ProjectConfigInterface = require( + `../../projects/projects/${dirent.name}/xrengine.config.ts` + ).default if (!config.databaseSeed) return null return path.join(dirent.name, config.databaseSeed) } catch (e) { diff --git a/packages/server-core/src/services.ts b/packages/server-core/src/services.ts index 63254e7f12..f9816aac55 100755 --- a/packages/server-core/src/services.ts +++ b/packages/server-core/src/services.ts @@ -51,8 +51,9 @@ const installedProjects = fs.existsSync(path.resolve(__dirname, '../../projects/ .filter((dirent) => dirent.isDirectory()) .map((dirent) => { try { - const config: ProjectConfigInterface = - require(`../../projects/projects/${dirent.name}/xrengine.config.ts`).default + const config: ProjectConfigInterface = require( + `../../projects/projects/${dirent.name}/xrengine.config.ts` + ).default if (!config.services) return null return path.join(dirent.name, config.services) } catch (e) { diff --git a/packages/server-core/src/social/invite/invite.class.ts b/packages/server-core/src/social/invite/invite.class.ts index aaadc06c73..3ac994a079 100755 --- a/packages/server-core/src/social/invite/invite.class.ts +++ b/packages/server-core/src/social/invite/invite.class.ts @@ -112,7 +112,7 @@ export const inviteReceived = async (inviteService: InviteService, query) => { delete query.type delete query.search - return (await inviteService.find({ + return (await inviteService._find({ query: { ...query, $or: [ @@ -152,7 +152,7 @@ export const inviteSent = async (inviteService: InviteService, query: Query) => delete query.type delete query.search - return (await inviteService.find({ + return (await inviteService._find({ query: { ...query, userId: query.userId