Merge branch 'betterStorage' into shigusegubu

* betterStorage:
  Fixed "user.id is undefined" or something error more sane by properly handling HTTP errors
  undo rename because it makes less sense now.
  proxying nodeinfo
  made FE work even without either api or static config
  Removed warning. Added support for working without static/config.json
  more missing stuff
  fix some missing stuff
  translations
  Added more stuff that's actually being added to instanceConfig, simplified the whitelist.
  more refactoring
  some recategorization of options...
  Initial version
This commit is contained in:
Henry Jameson 2018-09-17 19:08:41 +03:00
commit b0af6b572c
5 changed files with 96 additions and 74 deletions

View file

@ -335,7 +335,14 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
url += `?${queryString}`
return fetch(url, { headers: authHeaders(credentials) }).then((data) => data.json())
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => {
if (data.ok) {
return data
}
throw new Error('Error fetching timeline')
})
.then((data) => data.json())
}
const verifyCredentials = (user) => {