Skip to content

Commit

Permalink
remove a few logs
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed Aug 12, 2023
1 parent 4f8af7a commit 2fe9991
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
6 changes: 1 addition & 5 deletions resources/js/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,16 @@ export class ApiService {
message: error[key][0],
};
});
console.log('rejected errors');
reject(errors);
} else {
console.log('rejected');
reject({ field: 'Error', message });
}
}

if (res.field == 'Error') {
console.log('has error');
reject(res);
}
console.log(res);
console.log('resolved');

resolve(res);
});
});
Expand Down
19 changes: 8 additions & 11 deletions resources/js/components/pages/Setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,18 @@ const setupAccount = async () => {
const parsedUrl = new URL(url.value!);
if (!(await appStore.checkURL(parsedUrl))) return;
console.log('before setup');
const result = await appStore.setupAccount({
url: parsedUrl,
authorization_token: authorizationToken.value,
});
console.log('result', result);
console.log('before redirect');
redirectToCollections();
if (
await appStore.setupAccount({
url: parsedUrl,
authorization_token: authorizationToken.value,
})
) {
redirectToCollections();
}
} catch (e: any) {
console.log('catch');
snackbar.error({ title: e.message || e });
}
console.log('after catch');
isLoading.value = false;
};
Expand Down
11 changes: 1 addition & 10 deletions resources/js/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,11 @@ export const useAppStore = defineStore('app', {
if (this.hasFuelTanksPackage) this.addFuelTanksNavigation();
if (this.hasMarketplacePackage) this.addMarketplaceNavigation();

console.log('before fetch');
await this.fetchCollectionIds();
console.log('after fetch');

return true;
return await this.fetchCollectionIds();
} catch (error: any) {
console.log('snack error');
snackbar.error({ title: error });
}

console.log('before false');
return false;
},
async setupAccount({ url, authorization_token }: { url: URL; authorization_token: string }) {
Expand Down Expand Up @@ -204,12 +198,9 @@ export const useAppStore = defineStore('app', {
this.collections = collectionsData.edges.map((collection: any) => collection.node.collectionId);
}
} catch {
// do nothing
console.log('inside catch');
return false;
}

console.log('before return');
return true;
},
async login(email: string, password: string) {
Expand Down

0 comments on commit 2fe9991

Please sign in to comment.