@@ -115,6 +115,14 @@ export default {
115115 this .filters [name] = filters;
116116 },
117117 async search () {
118+ const searchRequest = await this .$http .post (' /search' , {
119+ min_age: this .filters .age .min ,
120+ max_age: this .filters .age .max ,
121+ min_score: this .filters .popularity .min ,
122+ max_score: this .filters .popularity .max ,
123+ max_distance: this .filters .distance .max ,
124+ tags: this .filters .interests ,
125+ });
118126 if (this .filters .interests .length === 0 ) {
119127 this .filters .interests = [
120128 ' swimming' , ' wine' , ' reading' , ' foodie' , ' netflix' , ' music' , ' yoga' , ' golf' ,
@@ -128,14 +136,6 @@ export default {
128136 ' astrology' , ' board games' , ' craft beer' , ' coffee' , ' writer' ,
129137 ];
130138 }
131- const searchRequest = await this .$http .post (' /search' , {
132- min_age: this .filters .age .min ,
133- max_age: this .filters .age .max ,
134- min_score: this .filters .popularity .min ,
135- max_score: this .filters .popularity .max ,
136- max_distance: this .filters .distance .max ,
137- tags: this .filters .interests ,
138- });
139139 this .recommendations = searchRequest .data .search_results ;
140140 this .recommendations .sort ((a , b ) => a .distance - b .distance );
141141 for (let i = 0 ; i < this .recommendations .length ; i += 1 ) {
0 commit comments