diff --git a/webtask-zoho.js b/webtask-zoho.js index 19c6796..ca5d502 100644 --- a/webtask-zoho.js +++ b/webtask-zoho.js @@ -34,10 +34,25 @@ const sendRequest = (options, res) => { }) } +server.get('/', (req, res) => { + res.send(` +
/newsletter/:data
/crm/:data
+ `)
+})
+
//
// Subscribe to newsletter via Zoho Campaigns API
// https://www.zoho.com/campaigns/newhelp/api/contact-subscribe.html
//
+server.get('/newsletter', (req, res) => {
+ res.send(`
+ /newsletter/{Contact Email:info@oceanprotocol.com}
/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}
`) // eslint-disable-line max-len
+})
+
server.get('/crm/:data', (req, res) => {
const { ZOHO_CRM_TOKEN } = req.webtaskContext.secrets
const { data } = req.params