mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2025-11-04 06:31:55 +00:00 
			
		
		
		
	Use opensearch for suggestions api.
This commit is contained in:
		@@ -47,9 +47,11 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        async refreshSuggestions() {
 | 
			
		||||
            this.searchSuggestions = await this.fetchJson(this.apiUrl() + "/suggestions", {
 | 
			
		||||
                query: this.searchText,
 | 
			
		||||
            });
 | 
			
		||||
            this.searchSuggestions = (
 | 
			
		||||
                await this.fetchJson(this.apiUrl() + "/opensearch/suggestions", {
 | 
			
		||||
                    query: this.searchText,
 | 
			
		||||
                })
 | 
			
		||||
            )?.[1];
 | 
			
		||||
            this.searchSuggestions.unshift(this.searchText);
 | 
			
		||||
            this.setSelected(0);
 | 
			
		||||
        },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user