daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   return new Promise((resolve, reject) => {
  2.     const upload = new Request({
  3.       name: new String(data.name) || undefined,
  4.       argument: new String(data.argument) || undefined,
  5.       date: new String(data.date),
  6.       origin: new String(data.origin) || undefined,
  7.       value: new String(data.status) || undefined,
  8.       device: new String(data.device) || undefined,
  9.     })
  10.  
  11.     upload.save((err, data) => {
  12.       if (err) {
  13.         console.log(err)
  14.         reject(err)
  15.       }
  16.       else {
  17.         console.log(data)
  18.         resolve(data)
  19.       }
  20.     })
  21.   })
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