Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fixed bug in invite searching
Browse files Browse the repository at this point in the history
  • Loading branch information
barankyle committed Aug 30, 2023
1 parent 72d46ed commit 73bc7db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions packages/server-core/src/seeder-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions packages/server-core/src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions packages/server-core/src/social/invite/invite.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 73bc7db

Please sign in to comment.