Skip to content
Snippets Groups Projects
Commit 8ef69bb7 authored by scmoritz's avatar scmoritz
Browse files

Merge branch 'events' into 'master'

Store resource items in list

See merge request amiv-website!19
parents bd530562 e3d0ba16
No related branches found
No related tags found
1 merge request!19Store resource items in list
......@@ -23,6 +23,9 @@ export default class Resource {
method: 'GET',
url: `${apiUrl}/${this.resource}/?${queryString}`,
headers: { Authorization: `Token ${getToken()}` },
}).then((data) => {
this.list = data._items;
return data;
}).catch((err) => {
// If the error is 401, the token is invalid -> auto log out
if (err._error.code === 401) { logout(); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment