daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function processRelationship(johnsID, ygrittesID, johnsFirstName, johnsLastName, ygrittesFirstName, ygrittesLastName, ygrittesPhoneNumber, requestType)
  2. {
  3.     switch(requestType.toLowerCase())
  4.     {
  5.         case "sendlove":
  6.             console.log();
  7.             console.log("Calling send love with UserID " + johnsID);
  8.             console.log();
  9.             console.log("Ygritte's Name from processRelationship = " + ygrittesFirstName + " " + ygrittesLastName);
  10.             sendLove(johnsID, johnsFirstName, johnsLastName, ygrittesFirstName, ygrittesLastName, ygrittesPhoneNumber);
  11.             break;
  12.         case "scheduledate":
  13.             scheduleDate(johnsID);
  14.             break;
  15.  
  16.         case "getstarted":
  17.             console.log("Scarting Scar.");
  18.  
  19.             //Wolfboy and Tigerboy: over here we need to detect the ID of the user who pressed Get Scarted. Then we check that user's presence in Mongo - and if the user is not present at all, we add them - otherwise we do nothing.
  20.             //Now we check Mongo.
  21.             checkForAndInsertSingleUserIntoDB(johnsID, ygrittesID, johnsFirstName, johnsLastName, ygrittesPhoneNumber, "getstarted"); //dateArr is insignificant for this scenario, so we pass a null.
  22.  
  23.             break;
  24.  
  25.         case "accepted": //Wolfboy and Tigerboy - made changes on 6/8/2018.
  26.             //Wolfboy and Tigerboy: same scenario as in "getstarted", we check for the user & insert inside this function.
  27.             checkForAndInsertSingleUserIntoDB(johnsID, ygrittesID, ygrittesFirstName, ygrittesLastName, ygrittesPhoneNumber, "accepted");
  28.             break;
  29.         case "declined": //Wolfboy and Tigerboy - made changes on 6/8/2018.
  30.             //Wolfboy and Tigerboy: same scenario as in "getstarted", we check for the user & insert inside this function.
  31.             checkForAndInsertSingleUserIntoDB(johnsID, ygrittesID, ygrittesFirstName, ygrittesLastName, ygrittesPhoneNumber, "declined");
  32.             break;
  33.         default:
  34.             console.log("Unknown request type.");
  35.             break;
  36.     }
  37.     console.log('message sent!');
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top