Skip to content

Commit d4a6eed

Browse files
author
Parth Shah
committed
fixes #35
1 parent 95f29b0 commit d4a6eed

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/events/projects/index.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,6 @@ import {
55
import util from '../../util'
66
import config from 'config'
77
import querystring from 'querystring'
8-
import topicService from '../../services/topicService'
9-
10-
const _addProjectStatus = (req, logger, project) => {
11-
const topics = [
12-
{
13-
title: 'Hello, Coder here! Your project has been created successfully',
14-
body: 'It took almost 245ms for me to create it, but all is good now.\
15-
That\'s a lot of hard work for a robot, you know!'
16-
}, {
17-
title: 'Hey there, I\'m ready with the next steps for your project!',
18-
body: `<p>I went over the project and I see we still need to collect more\
19-
details before I can use my super computational powers and create your quote.</p>\
20-
<p>Head over to the <a href="/projects/${project.id}/specification/">Specification</a>\
21-
section and answer all of the required questions. If you already have a document\
22-
with specification, verify it against our checklist and upload it.</p>`
23-
}
24-
]
25-
// NOTE: running these in sequence cos we want topic[0] to be created first
26-
// firing these events in parallel doesn't ensure that topic[0] is created first
27-
return topicService.createTopic(req, project.id, topics[0].title, topics[0].body)
28-
.then(() => topicService.createTopic(req, project.id, topics[1].title, topics[1].body))
29-
.then(() => {
30-
logger.debug('post-project creation messages posted')
31-
return true
32-
})
33-
}
348

359
/**
3610
* Creates a lead in salesforce for the connect project.
@@ -84,7 +58,6 @@ const projectCreatedHandler = (logger, msg, channel) => {
8458
}
8559
}
8660
return Promise.all([
87-
_addProjectStatus(req, logger, project),
8861
_addSalesforceLead(token, logger, project).then((resp)=> logger.debug('web to lead response:', resp.status))
8962
]);
9063
})

0 commit comments

Comments
 (0)