Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
712 B
4
Indexable
Never
function doGet(e) { 

var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1bIBf9Bk_XGvKIt4rxC5KtmdRoBpx9xzhL0oAp_uyqMY/edit#gid=0");
var sheet = ss.getSheetByName("user_accounts");

 addUser(e,sheet);
}

function doPost(e) { 
  var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1bIBf9Bk_XGvKIt4rxC5KtmdRoBpx9xzhL0oAp_uyqMY/edit#gid=0");
  var sheet = ss.getSheetByName("user_accounts"); 
  
  addUser(e,sheet);
}


function addUser(e,sheet) {
  var email = e.parameter.email ; 
  var password = e.parameter.password ;
  var phone = e.parameter.phone ;
  var address = e.parameter.address ;

  sheet.appendRow([email,password,phone,address]);
}