Chrome расширение выборки не повторное получение - PullRequest
0 голосов
/ 11 декабря 2019

Я использую будильник для извлечения уведомлений GitHub с помощью API GitHub v3, и замечаю, что API выборки вызывается своевременно, но не получают новейших результатов, не уверен, в чем может быть проблема?

 try{ 
    const count = await getNotifications(searchQueries);
    await chrome.storage.local.set({[dbName]: count})
    chrome.storage.local.get(dbName, showNotification);
 }catch(e) {
    console.log(e)
 }

 ...
 async function getNotifications(repo) {
   const headers = {
      'Authorization': `Bearer ${access_token}`,
      'Content-Type': 'application/json',
   }
   let response = await fetch(`https://api.github.com/notifications`, {headers});
   const notifications = await response.json();
   // alert(notifications.length)
   return notifications.length
 }
...