Compare commits

...

3 Commits

2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,14 @@ export const fetchWrapper = {
};
function request(method) {
console.log("INT STATUS: ", navigator.onLine);
if (!navigator.onLine) {
const alertStore = useAlertStore();
alertStore.error("Please check your internet connection");
return Promise.reject("connection error");
}
return (url, body, isFormData = false) => {
console.log("url: " + url, "body: ", body, "isFormData: ", isFormData);
const requestOptions = {

View File

@ -218,7 +218,7 @@ const onRegister = async () => {
validate.value.$touch();
// if form is invalid
if (validate.value.$invalid) return;
// if (validate.value.$invalid) return;
try {
isLoading.value = true;