Read credentials from API responses

This commit is contained in:
D. Berge
2020-10-11 17:54:34 +02:00
parent 0512ac2c3c
commit 00f4fcf292

View File

@@ -18,6 +18,9 @@ async function api ({state, commit, dispatch}, [resource, init = {}, cb]) {
cb(null, res);
}
if (res.ok) {
await dispatch('setCredentials');
try {
return await res.json();
} catch (err) {