Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. const modelInstance = new RegisterModel({
  2. cred: {
  3. nameValue: 'Sample',
  4. emailValue: 'sample@gmail.com',
  5. passwordValue: 'sample122',
  6. },
  7. location: {
  8. addressValue: 'sample address',
  9. cityValue: 'sample',
  10. stateValue: 'sample',
  11. postalValue: 123344,
  12. },
  13. card: {
  14. cardName: 'Sample',
  15. cardNumber: 231232143,
  16. securityCode: 131,
  17. expirationMonth: 1,
  18. expirationYear: 2022,
  19. },
  20. })
  21. modelInstance.save(function (err) {
  22. console.log('@@@@@ Inside the callback ', err);
  23. if (err) {
  24. console.log('the error is ', err);
  25. }
  26. console.log('saved the model instance @@@@@@');
  27. console.log(modelInstance, '@@@@@Helllo@@@@@');
  28. });
  29. modelInstance.find({postalValue: 123344 }).then(model=>
  30. console.log('model@@@',model)
  31. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement