Procházet zdrojové kódy

Use DELETE for removing profile picture

sbkwgh před 7 roky
rodič
revize
26768001d7

+ 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
 					})