File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/routes/copilotOpportunity Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,11 @@ module.exports = [
32
32
} )
33
33
. then ( ( copilotOpportunity ) => {
34
34
const plainOpportunity = copilotOpportunity . get ( { plain : true } ) ;
35
- let canApplyAsCopilot = false ;
36
- req . log . info ( plainOpportunity . project . members ) ;
37
- req . log . info ( req . authUser , 'authuser' ) ;
38
- if ( plainOpportunity && plainOpportunity . project && plainOpportunity . project . members && req . authUser ) {
39
- const existingMember = plainOpportunity . project . members . find ( item => item . userId === req . authUser . userId ) ;
40
- req . log . info ( existingMember , 'existingMember' ) ;
41
- canApplyAsCopilot = ! ! ! existingMember ;
42
- }
35
+ const memberIds = plainOpportunity . project . members . map ( ( member ) => member . userId ) ;
43
36
// This shouldn't be exposed to the clientside
44
37
delete plainOpportunity . project . members ;
45
38
const formattedOpportunity = Object . assign ( {
46
- canApplyAsCopilot ,
39
+ members : memberIds ,
47
40
} , plainOpportunity ,
48
41
plainOpportunity . copilotRequest ? plainOpportunity . copilotRequest . data : { } ,
49
42
{ copilotRequest : undefined } ,
You can’t perform that action at this time.
0 commit comments