No error message when user is not authenticated

This commit is contained in:
Florian Dupret 2021-04-29 13:13:06 +02:00
commit 3e49d08c5b
2 changed files with 10 additions and 3 deletions

View file

@ -8,8 +8,10 @@ axios.defaults.headers.common[
] = `Bearer ${store.getters.getToken}`;
function handleError(error, getText) {
if(getText) {
utils.notify.error(getText(error.response));
return false;
}
return false;
}
function handleResponse(response, getText) {
if(response && getText) {

View file

@ -50,8 +50,13 @@ export const groupAPI = {
);
},
async current() {
let response = await apiReq.get(groupsURLs.current);
return response.data;
const response = await apiReq.get(
groupsURLs.current,
null,
null);
if(response) {
return response.data;
}
},
update(data) {
return apiReq.put(