-
Notifications
You must be signed in to change notification settings - Fork 0
/
duplicateSorter.js
43 lines (27 loc) · 1.18 KB
/
duplicateSorter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var server = require("./duplicateSorterServer");
var router = require("./router");
var requestHandlers = require("./requestHandlers");
var handle = {}
//retrieves start page
handle["/"] = requestHandlers.start;
//retrieves all emails in db
handle["/getEmails"] = requestHandlers.getEmails;
// returns true/false if single email + template exists in db
handle["/checkSingleEmail"] = requestHandlers.checkSingleEmail;
// checks a list of emails, returns list of emails not in db
handle["/checkEmailList"] = requestHandlers.checkEmailList;
// adds a single new email to db
handle["/addNewEmailAddress"] = requestHandlers.addNewEmailAddress;
// add a list of new emails to db
handle["/addNewList"] = requestHandlers.addNewList;
//flag email as bounced
handle["/emailBounced"] = requestHandlers.emailBounced;
//remove email
handle["/removeEmailHandler"] = requestHandlers.removeEmailHandler;
//addTemplate
handle["/addNewTemplate"] = requestHandlers.addNewTemplate;
//getEmails
handle["/retrieveEmailsForTemplate"] = requestHandlers.retrieveEmailsForTemplate;
//getTemplates
handle["/getAllTemplatesforEmail"] = requestHandlers.getAllTemplatesforEmail;
server.start(router.route, handle);