Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2022
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- DashboardPage --------------------------
  2.  
  3. const DashboardPage = () => {
  4.  
  5.   useEffect(()=>{
  6.     getOk();
  7.   },[])
  8.  
  9.   let getOk = async ()=>{
  10.       try {
  11.         const res2 = await fetch('/api/elo', {
  12.           method: 'GET',
  13.           headers: {
  14.               'Accept': 'application/json',
  15.           }
  16.         });
  17.  
  18. --- Coś tam dalej ---
  19.  
  20. --- Routes --------------------------
  21.          
  22. router.get('/api/elo', async (req, res)=>{
  23.     const {access}=req.cookies;
  24.     console.log({access})
  25. })
  26.  
  27. --- Coś tam dalej ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement