CodeWithHarry / iNotebook-React

INotebook is a React Application for managing personal notes on the cloud
343 stars 193 forks source link

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

Open thakoraarya opened 1 year ago

thakoraarya commented 1 year ago
// 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)