CodeWithHarry / iNotebook-React

INotebook is a React Application for managing personal notes on the cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getnotes not working SyntaxError: Unexpected end of input at NoteState.js:22:1

thakoraarya opened this issue · comments

// Get all Notes
  const getNotes = async () => {
    // API Call
    const response = await fetch(`${host}getnotes`, {
      method: 'GET',
      mode: 'no-cors',
      headers: {
        'Content-Type': 'text/html',
        "auth-token": token
      }
    })
    const jsn = await response.json()
    console.log(jsn);
  }

Failed to load resource: the server responded with a status of 401 (Unauthorized)