mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
No error message when user is not authenticated
This commit is contained in:
parent
b61b799235
commit
3e49d08c5b
2 changed files with 10 additions and 3 deletions
|
@ -8,8 +8,10 @@ axios.defaults.headers.common[
|
||||||
] = `Bearer ${store.getters.getToken}`;
|
] = `Bearer ${store.getters.getToken}`;
|
||||||
|
|
||||||
function handleError(error, getText) {
|
function handleError(error, getText) {
|
||||||
|
if(getText) {
|
||||||
utils.notify.error(getText(error.response));
|
utils.notify.error(getText(error.response));
|
||||||
return false;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
function handleResponse(response, getText) {
|
function handleResponse(response, getText) {
|
||||||
if(response && getText) {
|
if(response && getText) {
|
||||||
|
|
|
@ -50,8 +50,13 @@ export const groupAPI = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async current() {
|
async current() {
|
||||||
let response = await apiReq.get(groupsURLs.current);
|
const response = await apiReq.get(
|
||||||
return response.data;
|
groupsURLs.current,
|
||||||
|
null,
|
||||||
|
null);
|
||||||
|
if(response) {
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
update(data) {
|
update(data) {
|
||||||
return apiReq.put(
|
return apiReq.put(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue