@@ -166,26 +166,26 @@ export default {
166166 async buttonClicked (... args ) {
167167 const [name ] = args;
168168 if (name === ' like' ) {
169- await this .$http .post (` /like/${ this .user .id } ` , { is_superlike: false });
169+ await this .$http .post (` /like/${ this .user .id } ` , { is_superlike: false }, { accessTokenRequired : true } );
170170 this .likeButtons .likeClicked = true ;
171171 } else if (name === ' superLike' ) {
172- await this .$http .post (` /like/${ this .user .id } ` , { is_superlike: true });
172+ await this .$http .post (` /like/${ this .user .id } ` , { is_superlike: true }, { accessTokenRequired : true } );
173173 this .likeButtons .superLikeClicked = true ;
174174 }
175- const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` );
175+ const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` , { accessTokenRequired : true } );
176176 await this .$store .dispatch (' login' , user .data );
177177 this .checkIfUserIsMatched ();
178178 },
179179 async buttonRevert (... args ) {
180180 const [name ] = args;
181181 if (name === ' like' ) {
182- await this .$http .post (` /unlike/${ this .user .id } ` , { is_superlike: false });
182+ await this .$http .post (` /unlike/${ this .user .id } ` , { is_superlike: false }, { accessTokenRequired : true } );
183183 this .likeButtons .likeClicked = false ;
184184 } else if (name === ' superLike' ) {
185- await this .$http .post (` /unlike/${ this .user .id } ` , { is_superlike: true });
185+ await this .$http .post (` /unlike/${ this .user .id } ` , { is_superlike: true }, { accessTokenRequired : true } );
186186 this .likeButtons .superLikeClicked = false ;
187187 }
188- const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` );
188+ const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` , { accessTokenRequired : true } );
189189 await this .$store .dispatch (' login' , user .data );
190190 this .checkIfUserIsMatched ();
191191 },
@@ -196,22 +196,22 @@ export default {
196196 }
197197 },
198198 async makeReport () {
199- await this .$http .post (` /profile/report/${ this .user .id } ` , { reason: this .report });
199+ await this .$http .post (` /profile/report/${ this .user .id } ` , { reason: this .report }, { accessTokenRequired : true } );
200200 this .reported = true ;
201201 setTimeout (() => {
202202 this .reported = false ;
203203 }, 3000 );
204204 },
205205 async block () {
206- await this .$http .post (` /profile/block/${ this .user .id } ` );
206+ await this .$http .post (` /profile/block/${ this .user .id } ` , null , { accessTokenRequired : true } );
207207 this .blocked = true ;
208- const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` );
208+ const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` , { accessTokenRequired : true } );
209209 await this .$store .dispatch (' login' , user .data );
210210 },
211211 async unblock () {
212- await this .$http .post (` /profile/unblock/${ this .user .id } ` );
212+ await this .$http .post (` /profile/unblock/${ this .user .id } ` , null , { accessTokenRequired : true } );
213213 this .blocked = false ;
214- const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` );
214+ const user = await this .$http .get (` /users/${ this .$store .getters .getLoggedInUser .id } ` , { accessTokenRequired : true } );
215215 await this .$store .dispatch (' login' , user .data );
216216 },
217217 checkIfUserIsLiked () {
@@ -270,7 +270,7 @@ export default {
270270 }
271271 },
272272 async mounted () {
273- const sliderRangesRequest = await this .$http .get (' /search/values' );
273+ const sliderRangesRequest = await this .$http .get (' /search/values' , { accessTokenRequired : true } );
274274 const maxScore = sliderRangesRequest .data .search_minmax .max_score ;
275275 const sliderScore = document .getElementById (' sliderScore' );
276276 if (sliderScore) {
0 commit comments