@@ -85,25 +85,25 @@ export default {
8585 this .currentValueBackup = this .currentValue ;
8686 try {
8787 if (this .type === ' firstName' ) {
88- await this .$http .patch (' /profile/edit/first_name' , { first_name: this .currentValue });
88+ await this .$http .patch (' /profile/edit/first_name' , { first_name: this .currentValue }, { accessTokenRequired : true } );
8989 } else if (this .type === ' lastName' ) {
90- await this .$http .patch (' /profile/edit/last_name' , { last_name: this .currentValue });
90+ await this .$http .patch (' /profile/edit/last_name' , { last_name: this .currentValue }, { accessTokenRequired : true } );
9191 } else if (this .type === ' email' ) {
92- await this .$http .put (' /profile/edit/email' , { email: this .currentValue });
92+ await this .$http .put (' /profile/edit/email' , { email: this .currentValue }, { accessTokenRequired : true } );
9393 } else if (this .type === ' username' ) {
94- await this .$http .patch (' /profile/edit/username' , { username: this .currentValue });
94+ await this .$http .patch (' /profile/edit/username' , { username: this .currentValue }, { accessTokenRequired : true } );
9595 } else if (this .type === ' bio' ) {
96- await this .$http .patch (' /profile/edit/bio' , { bio: this .currentValue });
96+ await this .$http .patch (' /profile/edit/bio' , { bio: this .currentValue }, { accessTokenRequired : true } );
9797 } else if (this .type === ' password' ) {
9898 await this .$http .put (' /profile/edit/password' , {
9999 old_password: this .passwordOld ,
100100 new_password: this .currentValue ,
101- });
101+ }, { accessTokenRequired : true } );
102102 this .currentValue = ' ' ;
103103 this .passwordRepeat = ' ' ;
104104 this .passwordOld = ' ' ;
105105 }
106- const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` );
106+ const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` , { accessTokenRequired : true } );
107107 await this .$store .dispatch (' login' , user .data );
108108 } catch (error) {
109109 this .error = error .response .data .error .message ;
0 commit comments