Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forEach(request.body.contact,function(row,index){
- if(request.body.contact[index].tempid)
- {
- var o=request.body.contact[index];
- pair=Object.keys(o).map(function(a){ return [a, o[a]] });
- AM.addcontact(pair,request.session.user,request.body.contact.length,function(e,o){
- if(!o)
- {
- response.send('something went wrong'+e);
- }
- else
- { //response.send(o);
- ardata+=o;
- }
- });
- }
- else
- {
- response.send('please provide atleast cid or tempid for insertion or updation of contacts');
- }
- response.send(ardata);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement