From 16357c0e48bf1006d1fd81f944aa0ac5ddd1e70d Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 17 Oct 2022 08:25:33 +0200 Subject: admin: Delete an user avatar --- pages/settings.vue | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'pages') diff --git a/pages/settings.vue b/pages/settings.vue index 5a74ced..8b8bad7 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -124,16 +124,14 @@ export default { }); }, deleteAvatar() { - this.$store - .dispatch("users/deleteAvatar", this.me.id) - .then((response) => { - if (response.status == 200) { - this.$toast.success("Avatar has been removed"); - this.avatarChanged = true; - } else { - this.$toast.error("Error removing"); - } - }); + this.$store.dispatch("users/deleteAvatar").then((response) => { + if (response.status == 200) { + this.$toast.success("Avatar has been removed"); + this.avatarChanged = true; + } else { + this.$toast.error("Error removing"); + } + }); }, save(event) { const f = this.form; -- cgit v1.2.3-18-g5258