SHARE
TWEET

Untitled

a guest Oct 15th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   async index(req, res) {
  2.     const token = await keystoneService.checkToken().then(token=>{
  3.       let config = {
  4.           headers: {
  5.             "X-Auth-Token": token,
  6.  
  7.           }
  8.         }
  9.  
  10.       axios.get("https://d.edudrive.rnp.br:5000/v3/users",config).then(response=>{
  11.         console.log(response.data.users);
  12.         return res.json(response.data.users);
  13.     }).catch(error=>{
  14.         console.log(error);
  15.     })
  16.  
  17.     });
  18.  
  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