Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-02-27 16:21:22 +0300
committerdartcafe <github@dartcafe.de>2021-02-27 16:21:22 +0300
commit45ca1fa8e97ccf6e35fe5a2516b6b68b04f87a3d (patch)
tree88c745ccf9535d1ce59ce41d6b9a97d89fe11b75 /src/js/components/SideBar/SideBarTabConfiguration.vue
parent09be13f03bcb7b149d6e942ead21949eb7975af1 (diff)
js code maintenance and tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/SideBar/SideBarTabConfiguration.vue')
-rw-r--r--src/js/components/SideBar/SideBarTabConfiguration.vue12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue
index d7041b26..a3e5e2ef 100644
--- a/src/js/components/SideBar/SideBarTabConfiguration.vue
+++ b/src/js/components/SideBar/SideBarTabConfiguration.vue
@@ -327,8 +327,8 @@ export default {
this.writeValue(e)
}, 1500),
- successDebounced: debounce(function(response) {
- showSuccess(t('polls', '"{pollTitle}" successfully saved', { pollTitle: response.data.title }))
+ successDebounced: debounce(function(title) {
+ showSuccess(t('polls', '"{pollTitle}" successfully saved', { pollTitle: title }))
emit('update-polls')
}, 1500),
@@ -361,7 +361,7 @@ export default {
await this.$store.dispatch('poll/delete', { pollId: this.poll.id })
emit('update-polls')
this.$router.push({ name: 'list', params: { type: 'relevant' } })
- } catch (e) {
+ } catch {
showError(t('polls', 'Error deleting poll.'))
}
},
@@ -371,9 +371,9 @@ export default {
showError(t('polls', 'Title must not be empty!'))
} else {
try {
- const response = await this.$store.dispatch('poll/update')
- this.successDebounced(response)
- } catch (e) {
+ await this.$store.dispatch('poll/update')
+ this.successDebounced(this.poll.title)
+ } catch {
showError(t('polls', 'Error writing poll'))
}
}