Quellcode durchsuchen

Use DELETE for removing profile picture

sbkwgh vor 7 Jahren
Ursprung
Commit
26768001d7
1 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen
  1. 2 4
      frontend/src/components/routes/SettingsGeneral.vue

+ 2 - 4
frontend/src/components/routes/SettingsGeneral.vue

@@ -175,7 +175,7 @@
 					})
 					.then(res => {
 						this.hideProflePictureModal()
-						this.picture.current = this.picture.dataURL
+						this.picture.current = res.data.picture
 					})
 					.catch(e => {
 						this.picture.loading = false
@@ -186,9 +186,7 @@
 			},
 			removeProfilePicture () {
 				this.axios
-					.post('/api/v1/user/' + this.$store.state.username + '/picture', {
-						picture: null
-					})
+					.delete('/api/v1/user/' + this.$store.state.username + '/picture')
 					.then(res => {
 						this.picture.current = null
 					})