Skip to content

Commit

Permalink
Merge pull request #3260 from SeedCompany/bugfix/project-workflow-eve…
Browse files Browse the repository at this point in the history
…nt-list
  • Loading branch information
CarsonF committed Jul 2, 2024
2 parents 10f0c8c + ecf65f8 commit 6c6b8e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class ProjectWorkflowNeo4jRepository
relation('out', '', 'workflowEvent', ACTIVE),
node('node'),
relation('out', undefined, 'who'),
node('who', 'User'),
node('who', 'Actor'),
])
.match([
node('project'),
Expand Down Expand Up @@ -104,7 +104,7 @@ export class ProjectWorkflowNeo4jRepository
.apply(
createRelationships(WorkflowEvent, {
in: { workflowEvent: ['Project', project] },
out: { who: ['User', session.userId] },
out: { who: ['Actor', session.userId] },
}),
)
.apply(this.hydrate())
Expand Down
5 changes: 3 additions & 2 deletions src/components/user/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ export class UserRepository extends DtoRepository<typeof User, [Session | ID]>(
.query()
.raw('', { ids })
.matchNode('user', 'User')
.where({ 'user.id': inArray('ids', true) })
.where({ 'user.id': inArray('$ids', true) })
.with('user as node')
.apply(this.hydrate(session))
.union()
.matchNode('agent', 'SystemAgent')
.where({ 'agent.id': inArray('ids', true) })
.where({ 'agent.id': inArray('$ids', true) })
.return<{ dto: UnsecuredDto<User | SystemAgent> }>(
merge('agent', {
__typename: '"SystemAgent"',
Expand Down

0 comments on commit 6c6b8e0

Please sign in to comment.