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 = [
3232 } )
3333 . then ( ( copilotOpportunity ) => {
3434 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 ) ;
4336 // This shouldn't be exposed to the clientside
4437 delete plainOpportunity . project . members ;
4538 const formattedOpportunity = Object . assign ( {
46- canApplyAsCopilot ,
39+ members : memberIds ,
4740 } , plainOpportunity ,
4841 plainOpportunity . copilotRequest ? plainOpportunity . copilotRequest . data : { } ,
4942 { copilotRequest : undefined } ,
You can’t perform that action at this time.
0 commit comments