Skip to content

A nodejs api to connect the website to zoho creator

Notifications You must be signed in to change notification settings

bloodconnect-india/api

Repository files navigation

BC API

node-current

A node js api for bloodconnect to connect zoho with the website forms.

It uses redis to store the oauth token using express-session. To install redis follow this link

Installation

Use the git cli to clone the repo.

git clone https://github.com/anish-yadav/bc-api
cd bc-api
yarn

After cloning add a .env file with the following key in the root directory

RAZORPAY_KEY=xxxxxxxxxxxxxxxxxxxxxxx
RAZORPAY_SECRET=xxxxxxxxxxxxxxxxxxxx
REFRESH_URL=xxxxxxxxxxxxxxxxxxxxxxxx
BASE_URL=xxxxxxxxxxxxxxxxxxxxxxxxxxx
BASE_GET_URL=xxxxxxxxxxxxxxxxxxxxxxx
SESSION_NAME=xxxxxxxxxxxxxxxxxxxxxxx
SESSION_SECRET=xxxxxxxxxxxxxxxxxxxxx

Editing

There are two routes, one for main requests and other for feedbacks.

1. Changing variable name in zoho form

Suppose you changes the Blood_Group to BG in add-donor

// routes/index.ts
data:{
      Name: req.body.Name,
      City_Donor: req.body.City_Donor,
      Email: req.body.Email,
      Phone_Number: "+91" + req.body.Phone_Number,
      //Blood_Group: req.body.Blood_Group,
      BG : req.body.BG,
      Date_of_Birth: changeToddmmyyyy(req.body.Date_of_Birth),
      Source: "Website",
}

*in case you changed City_Region name , make sure to change it in middleware too( helplers/zoho.ts ).

axios.post('/routename',(req,res) => {
   // do something here
}
request body format must be same as that in zoho creator form.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

A nodejs api to connect the website to zoho creator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •