Remove frontend console debug logs

This commit is contained in:
Kevin Thomas
2021-11-12 21:55:26 -08:00
parent a441698999
commit eb3c00d6c1
5 changed files with 12 additions and 52 deletions

View File

@@ -29,9 +29,6 @@ export default {
this.users = response.data.users
}
})
.catch((error) => {
console.error(error.response)
})
},
getCurrentUser () {
this.$http.get('/users/current')
@@ -40,9 +37,6 @@ export default {
this.currentUser = response.data.user
}
})
.catch((error) => {
console.error(error.response)
})
},
updateUserAdmin (id, isAdmin) {
this.$http.patch('/users/admin/'.concat(id), {
@@ -53,8 +47,7 @@ export default {
this.updateText = 'User updated'
}
})
.catch(function (error) {
console.error(error.response)
.catch(() => {
this.updateText = 'Error updating user'
})
},
@@ -67,8 +60,7 @@ export default {
this.updateText = 'User updated'
}
})
.catch(function (error) {
console.error(error.response)
.catch(() => {
this.updateText = 'Error updating user'
})
},
@@ -79,9 +71,6 @@ export default {
this.getUsers()
}
})
.catch((error) => {
console.error(error.response)
})
},
registerUser () {
this.$http.post('/users', {
@@ -100,9 +89,6 @@ export default {
this.getUsers()
}
})
.catch((error) => {
console.error(error.response)
})
}
}
}

View File

@@ -20,9 +20,6 @@ export default {
this.$router.push('/login')
}
})
.catch((error) => {
console.error(error.response)
})
},
getCurrentUser () {
this.loggedIn = false
@@ -35,8 +32,7 @@ export default {
this.$vuetify.theme.dark = response.data.user.darkMode
}
})
.catch((error) => {
console.error(error.response)
.catch(() => {
this.isAdmin = false
})
},
@@ -44,9 +40,6 @@ export default {
this.$http.patch('/users/dark-mode', {
darkMode: this.$vuetify.theme.dark
})
.catch((error) => {
console.error(error.response)
})
}
}
}

View File

@@ -25,10 +25,11 @@ export default {
})
.catch((error) => {
if (error.response.status === 401) {
this.snackbar = true
this.snackbarText = 'Login Failed: Unauthorized'
} else {
this.snackbarText = 'Login Failed'
}
console.error(error.response)
this.snackbar = true
})
}
}

View File

@@ -216,9 +216,6 @@ export default {
}
}
})
.catch((error) => {
console.error(error.response)
})
},
addDefaultProfile () {
this.$http.post('/profiles/default')
@@ -229,9 +226,6 @@ export default {
this.selectedProfile = defaultProfile
}
})
.catch((error) => {
console.error(error.response)
})
},
saveProfile () {
this.$http.post('/profiles', {
@@ -259,8 +253,7 @@ export default {
this.infoSnackbar = true
}
})
.catch((error) => {
console.error(error.response)
.catch(() => {
this.errorSnackbarText = 'Error Saving Profile'
this.errorSnackbar = true
})
@@ -288,8 +281,7 @@ export default {
this.infoSnackbar = true
}
})
.catch((error) => {
console.error(error.response)
.catch(() => {
this.errorSnackbarText = 'Error Saving Profile'
this.errorSnackbar = true
})
@@ -318,9 +310,6 @@ export default {
this.loadedSamples = profile.samples
}
})
.catch((error) => {
console.error(error.response)
})
},
deleteProfile () {
this.$http.delete('/profiles/'.concat(this.selectedProfile.id))
@@ -331,8 +320,7 @@ export default {
this.infoSnackbar = true
}
})
.catch((error) => {
console.error(error.response)
.catch(() => {
this.errorSnackbarText = 'Error Deleting Profile'
this.errorSnackbar = true
})
@@ -349,9 +337,6 @@ export default {
})
}
})
.catch((error) => {
console.error(error)
})
},
uploadSample () {
const formData = new FormData()
@@ -374,9 +359,10 @@ export default {
.catch((error) => {
if (error.response.status === 409) {
this.errorSnackbarText = 'Error Uploading Sample: Duplicate Sample Name'
this.errorSnackbar = true
} else {
this.errorSnackbarText = 'Error Uploading Sample'
}
console.error(error.response)
this.errorSnackbar = true
})
this.uploadSampleDialog = false
@@ -406,9 +392,6 @@ export default {
this.$vuetify.theme.dark = response.data.user.darkMode
}
})
.catch((error) => {
console.error(error.response)
})
}
}
}

View File

@@ -23,9 +23,6 @@ export default {
this.$router.push('/login')
}
})
.catch((error) => {
console.error(error.response)
})
}
}
}