Skip to content

Commit

Permalink
#129 Bugfix: duplicate call to save assessment (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensearle committed Dec 9, 2022
1 parent 48478d9 commit 9953cc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ if (process.env.VUE_APP_USE_FUNCTIONS_EMULATOR === 'true') {
const firestore = firebase.firestore();

// App check
const appCheck = firebase.appCheck();
let appCheck;
if (process.env.VUE_APP_RECAPTCHA_TOKEN) {
appCheck.activate(process.env.VUE_APP_RECAPTCHA_TOKEN);
appCheck = firebase.appCheck().activate(process.env.VUE_APP_RECAPTCHA_TOKEN);
}

// Other firebase exports
const auth = firebase.auth;

export { firestore, auth, functions };
export { firestore, auth, functions, appCheck };
export default firebase;
1 change: 0 additions & 1 deletion src/views/Assessment/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export default {
} else {
this.assessment.status = 'completed';
this.assessment.filePath = `${this.buildFileFolder }/${ this.assessment.fileRef}`;
await this.$store.dispatch('assessment/save', this.assessment);
routerName = 'assessment-success';
}
await this.$store.dispatch('assessment/save', this.assessment);
Expand Down

0 comments on commit 9953cc1

Please sign in to comment.